@@ -122,19 +122,19 @@ LLDB_NUMBER_TYPEMAP(enum SWIGTYPE);
122122}
123123
124124// Disable default type checking for this method to avoid SWIG dispatch issues.
125- //
125+ //
126126// Problem: SBThread::GetStopDescription has two overloads:
127- // 1. GetStopDescription(char* dst_or_null, size_t dst_len)
127+ // 1. GetStopDescription(char* dst_or_null, size_t dst_len)
128128// 2. GetStopDescription(lldb::SBStream& stream)
129129//
130130// SWIG generates a dispatch function to select the correct overload based on argument types.
131131// see https://www.swig.org/Doc4.0/SWIGDocumentation.html#Typemaps_overloading.
132132// However, this dispatcher doesn't consider typemaps that transform function signatures.
133133//
134134// In lua, our typemap converts GetStopDescription(char*, size_t) to GetStopDescription(int).
135- // The dispatcher still checks against the original (char*, size_t) signature instead of
135+ // The dispatcher still checks against the original (char*, size_t) signature instead of
136136// the transformed (int) signature, causing type matching to fail.
137- // This only affects SBThread::GetStopDescription since the type check also matches
137+ // This only affects SBThread::GetStopDescription since the type check also matches
138138// the argument name, which is unique to this function.
139139%typemap(typecheck, precedence=SWIG_TYPECHECK_POINTER) (char *dst_or_null, size_t dst_len) " "
140140
@@ -251,7 +251,8 @@ LLDB_NUMBER_TYPEMAP(enum SWIGTYPE);
251251%typemap(in) lldb::FileSP {
252252 luaL_Stream *p = (luaL_Stream *)luaL_checkudata (L, $input, LUA_FILEHANDLE);
253253 lldb::FileSP file_sp;
254- file_sp = std::make_shared<lldb_private::NativeFile>(p->f , false );
254+ file_sp = std::make_shared<lldb_private::NativeFile>(
255+ p->f , lldb_private::NativeFile::eOpenOptionReadWrite, false );
255256 if (!file_sp->IsValid ())
256257 return luaL_error (L, " Invalid file" );
257258 $1 = file_sp;
0 commit comments