bug-gdb
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

MI interface - how do I make breakpoints work?


From: tpgww
Subject: MI interface - how do I make breakpoints work?
Date: Mon, 26 Dec 2011 10:34:25 +1100

Hello all.

When running gdb/mi sessions inside my (custom) IDE, after starting the target 
application, breakpoints (temporary and/or permanent) are not being acted upon. 
I've tried IDE changes, different targets (single- and multi-threaded), gdb 7.1 
and 7.3, various combinations of gdb parameters and settings. I've read the 
gdb/mi manual. Sofar, I can't find anything that helps.

All help/advice gratefully received.

Some details:

execute:
gdb -q -f -n --interpreter=mi -directory=<relevant dir inserted here> 
-cd=<relevant dir inserted here>
pipe:
901-file-exec-and-symbols <absolute path of target inserted here>
902-list-target-features
903-gdb-set schedule-multiple on
904-gdb-set breakpoint pending on
905-inferior-tty-set /dev/pts/4
<optionally insert breakpoints here>
906-break-insert -t main
907-exec-run

These are piped back (gdb-prompt strings omitted):
=thread-group-added,id="i1"
901^done
902^done,features=[]
903^done
904^done
905^done
906^done,bkpt={number="1",type="breakpoint",disp="del",enabled="y",addr="0x080803d7",func="main",file="src/e2_main.c",fullname="/home/maker/Projects/e2work/latest/src/e2_main.c",line="681",times="0",original-location="main"}
=thread-group-started,id="i1",pid="10171"
=thread-created,id="1",group-id="i1"

and that's the end of it. The target executes, as if there were no breaks set.

OTOH, If I run that same series of things directly, via a console, it works as 
expected. That is, as well as the responses described above, I get

907^running
*running,thread-id="all"
=library-loaded,id="/lib/ld-linux.so.2",target-name="/lib/ld-linux.so.2",host-name="/lib/ld-linux.so.2",symbols-loaded="0",thread-group="i1"
<more like the previous one>
~"[Thread debugging using libthread_db enabled]\n"
~"Using host libthread_db library \"/lib/i686/libthread_db.so.1\".\n"
=breakpoint-modified,bkpt={number="1",type="breakpoint",disp="del",enabled="y",addr="0x080803d7",func="main",file="src/e2_main.c",fullname="/home/maker/Projects/e2work/latest/src/e2_main.c",line="681",times="1",original-location="main"}
*stopped,reason="breakpoint-hit",disp="del",bkptno="1",frame={addr="0x080803d7",func="main",args=[{name="argc",value="1"},{name="argv",value="0xbffff0c4"}],file="src/e2_main.c",fullname="/home/maker/Projects/e2work/latest/src/e2_main.c",line="681"},thread-id="1",stopped-threads="all",core="0"
=breakpoint-deleted,id="1"

Regards
Tom



reply via email to

[Prev in Thread] Current Thread [Next in Thread]