Skip to content

Commit

Permalink
not all systems have SBValue::GetSummary
Browse files Browse the repository at this point in the history
  • Loading branch information
jafl committed Feb 20, 2016
1 parent 9c8c0be commit cc32f1a
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 70 deletions.
1 change: 1 addition & 0 deletions include/make/sys/OSX_10_g++
Expand Up @@ -66,6 +66,7 @@ J_USE_THREADS := yes

J_RAW_SYSTEM_STUFF := \
-D_J_OSX -DSIZEOF_LONG=8 -DSIZEOF_INT=4 -DSIZEOF_LONGLONG=8 \
-D_J_LLDB_HAS_SBVALUE_GETSUMMARY \
-D_J_HAS_SYSCTL -D_XFT_NO_COMPAT_ -I/usr/X11/include/freetype2 \
-Wno-deprecated -Wno-c++11-narrowing

Expand Down
32 changes: 20 additions & 12 deletions programs/code_medic/code/LLDBVarNode.cpp
Expand Up @@ -95,13 +95,17 @@ LLDBVarNode::BuildTree
{
lldb::BasicType type = v.GetType().GetPointeeType().GetBasicType();

if ((type == lldb::eBasicTypeChar ||
type == lldb::eBasicTypeSignedChar ||
type == lldb::eBasicTypeUnsignedChar) &&
v.GetSummary() != NULL)
if (type == lldb::eBasicTypeChar ||
type == lldb::eBasicTypeSignedChar ||
type == lldb::eBasicTypeUnsignedChar)
{
value += " ";
value += v.GetSummary();
#ifdef _J_LLDB_HAS_SBVALUE_GETSUMMARY
if (v.GetSummary() != NULL)
{
value += " ";
value += v.GetSummary();
}
#endif
isSpecial = kJTrue;
}
else
Expand All @@ -112,13 +116,17 @@ LLDBVarNode::BuildTree
else if (v.GetType().GetTypeClass() == lldb::eTypeClassArray)
{
lldb::BasicType type = v.GetChildAtIndex(0).GetType().GetBasicType();
if ((type == lldb::eBasicTypeChar ||
type == lldb::eBasicTypeSignedChar ||
type == lldb::eBasicTypeUnsignedChar) &&
v.GetSummary() != NULL)
if (type == lldb::eBasicTypeChar ||
type == lldb::eBasicTypeSignedChar ||
type == lldb::eBasicTypeUnsignedChar)
{
value += " ";
value += v.GetSummary();
#ifdef _J_LLDB_HAS_SBVALUE_GETSUMMARY
if (v.GetSummary() != NULL)
{
value += " ";
value += v.GetSummary();
}
#endif
isSpecial = kJTrue;
}
}
Expand Down
2 changes: 1 addition & 1 deletion programs/code_medic/strings/medic_strings
Expand Up @@ -85,7 +85,7 @@ NoSelection::CMCommandDirector

Welcome::CMCommandDirector
"Welcome to Code Medic $vers
(requires: gdb 6.0 or newer, Xdebug 2.0 or newer)
(requires: gdb 7.4 or newer, Xdebug 2.0 or newer)

Running on top of:
"
Expand Down
108 changes: 51 additions & 57 deletions todo
@@ -1,11 +1,22 @@
ASIO
http://think-async.com/Asio
lightweight networking library

io_service::poll_one()


Split CMLineNumberTable into 2 extensions
update uses of itsBPList->SearchSorted to account for asm option

lldb: clear breakpoint in assembly window

gdb: show breakpoints and correct program location

until/jump -- use version with addr argument

lldb
document SB*.h

test on Linux
test watchpoints

Expand All @@ -15,6 +26,17 @@ lldb

when read from input, it echoes as output

replace rendering engine inside JXWindowPainter with UTF-8 version
http://cairographics.org/
will YUI yogi output correct be correct with check mark
libXft
printing
gs -dNOPAUSE -dBATCH -sDEVICE=pswrite -sOutputFile=junk2.ps junk.ps
http://www.stat.auckland.ac.nz/~paul/R/CM/CMR.html
http://pages.cs.wisc.edu/~ghost/doc/gnu/7.05/Fonts.htm
Symbol
Figure out how to use tt version -- this will also fix printing

java
selected stack frame
select source line
Expand All @@ -39,6 +61,18 @@ java

http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/jdb.html

xdebug
click stack trace: selection jumps back to last frame
temp breakpoint doesn't disappear

Enable XDSocket::StartTimer() when not debugging
Always update stack, even if Stack Trace window is hidden
Eliminate double call to get local vars
Preserve existing items; don't just delete all before update
request source from debugger instead of assuming that file:// exists
*set* values
support conditional breakpoints, etc.

-----

UTF-8
Expand Down Expand Up @@ -98,13 +132,6 @@ jcc
treelist should stop listening to tree until done adding

medic
disassembly window
until/jump -- use version with addr argument
show breakpoints via address field

update online documentation
requires gdb 7.4 on Linux

accept connection or switch to gdb: should stop listening on port
need simple example to submit to ACE list
restart either xdebug or java: unable to listen on port & crashes on exit
Expand All @@ -113,6 +140,23 @@ medic
enable call to UnlockDisplays(), when JXGetAssertHandler is defined
check every time symbols are loaded

for program with threads:
set scheduler-locking on/off/step
break <location> thread <gdb thread number>

CMBreakpointTable:
pressing return while editing the last row should save the value
problem is that setting breakpoint value takes time, so can't restart editing immediately

gdb test suite
start, choose program, set bkpt, run
start, run, open file, stop, set bkpt, continue
start with program name, set bkpt, run
start with core name
switch from core dump to running binary
switch from running binary to core dump
switch from one program to another

-----

leibnitz
Expand All @@ -137,13 +181,6 @@ JXMenu::PrepareToOpenMenu()

-----

medic
gdb for program with threads:
set scheduler-locking on/off/step
break <location> thread <gdb thread number>

OSX: stack trace loaded twice when hit breakpoint

multi-pane editing
split off itsBuffer,itsStyles,itsUndo/RedoList into JTextBuffer
leave recalc engine, cursor location, and other display stuff in JTextEditor
Expand Down Expand Up @@ -251,19 +288,6 @@ Clean up prefs
Split CBTextEditorPrefs into multiple panes
factor out JXEditStylesWidget from JXEditStylesDialog so it can be a card

medic
xdebug
click stack trace: selection jumps back to last frame
temp breakpoint doesn't disappear

Enable XDSocket::StartTimer() when not debugging
Always update stack, even if Stack Trace window is hidden
Eliminate double call to get local vars
Preserve existing items; don't just delete all before update
request source from debugger instead of assuming that file:// exists
*set* values
support conditional breakpoints, etc.

support D
http://en.wikipedia.org/wiki/D_(programming_language)
http://www.digitalmars.com/d/download.html
Expand All @@ -290,8 +314,6 @@ glove:
clean up .fd to match current layouts
test layouts on Linux and OS X

rendering
http://cairographics.org/

Support D-Bus
http://www.freedesktop.org/wiki/Software/dbus
Expand Down Expand Up @@ -377,22 +399,6 @@ jcc
warn about -- is the underlying code somehow reading the file to figure out
how big it is?

medic
CMBreakpointTable:
pressing return while editing the last row should save the value
problem is that setting breakpoint value takes time, so can't restart editing immediately

Same prefs menu in all windows

gdb test suite
start, choose program, set bkpt, run
start, run, open file, stop, set bkpt, continue
start with program name, set bkpt, run
start with core name
switch from core dump to running binary
switch from running binary to core dump
switch from one program to another

memory analyzer
option to print MDStatsDirector
records window:
Expand Down Expand Up @@ -430,18 +436,6 @@ JTextEditor::DrawInMargin
line #'s
bookmarks -- easier to see which line was marked

libXft
printing
gs -dNOPAUSE -dBATCH -sDEVICE=pswrite -sOutputFile=junk2.ps junk.ps
http://www.stat.auckland.ac.nz/~paul/R/CM/CMR.html
http://pages.cs.wisc.edu/~ghost/doc/gnu/7.05/Fonts.htm
Symbol
Figure out how to use tt version -- this will also fix printing

ASIO
http://think-async.com/Asio
lightweight networking library

-----

Windows
Expand Down

0 comments on commit cc32f1a

Please sign in to comment.