[Lldb-commits] [lldb] r156795 - in /lldb/trunk: include/lldb/Target/Platform.h include/lldb/Target/Target.h source/Plugins/Platform/MacOSX/PlatformDarwin.cpp source/Plugins/Platform/MacOSX/PlatformDarwin.h source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp source/Plugins/Process/gdb-remote/ProcessGDBRemote.h source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h source/Target/Platform.cpp source/Target/Target.cpp

Filipe Cabecinhas filcab at gmail.com
Tue May 15 02:05:53 PDT 2012


Shouldn't we be using arraysize(g_bp_modules) instead of sizeof(…)/sizeof(…)?  

Regards,  

  Filipe


On Tuesday, May 15, 2012 at 3:33 AM, Greg Clayton wrote:

> Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp?rev=156795&r1=156794&r2=156795&view=diff
> ==============================================================================
> --- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp (original)
> +++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp Mon May 14 21:33:01 2012
> @@ -823,3 +823,38 @@
> return NULL;
> }
>  
> +
> +BreakpointSP
> +PlatformDarwin::SetThreadCreationBreakpoint (Target &target)
> +{
> + BreakpointSP bp_sp;
> + static const char *g_bp_names[] =
> + {
> + "start_wqthread",
> + "_pthread_wqthread",
> + "_pthread_start",
> + };
> +
> + static const char *g_bp_modules[] =
> + {
> + "libsystem_c.dylib",
> + "libSystem.B.dylib"
> + };
> +
> + FileSpecList bp_modules;
> + for (int i = 0; i < sizeof(g_bp_modules)/sizeof(const char *); i++)
> + {
> + const char *bp_module = g_bp_modules[i];
> + bp_modules.Append(FileSpec(bp_module, false));
> + }







More information about the lldb-commits mailing list