This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug mi/15725] New: backtrace does not work in breakpoint commmand


http://sourceware.org/bugzilla/show_bug.cgi?id=15725

            Bug ID: 15725
           Summary: backtrace does not work in breakpoint commmand
           Product: gdb
           Version: 7.5
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mi
          Assignee: unassigned at sourceware dot org
          Reporter: xdegaye at gmail dot com

When assigning one breakpoint a command list using

commands n
bracktrace
end

When using gdb/mi, the call stack does not show when the breakpoint is
encountered, print command works fine. See the following output.

======
$ gdb --interpreter=mi testsuite/foobar
=thread-group-added,id="i1"
~"GNU gdb (GDB) 7.5.1\n"
~"Copyright (C) 2012 Free Software Foundation, Inc.\n"
~"License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to
change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by
law.  Type \"show copying\"\nand \"show warranty\" for details.\n"
~"This GDB was configured as \"x86_64-unknown-linux-gnu\".\nFor bug reporting
instructions, please see:\n"
~"<http://www.gnu.org/software/gdb/bugs/>...\n"
~"Reading symbols from testsuite/foobar..."
~"done.\n"
(gdb) 
-interpreter-exec console "break bar"
~"Breakpoint 1 at 0x400819: file bar.c, line 5.\n"
=breakpoint-created,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x0000000000400819",func="bar",file="bar.c",fullname="testsuite/bar.c",line="5",times="0",original-location="bar"}
^done
(gdb) 
-interpreter-exec console "commands 1"
~"Type commands for breakpoint(s) 1, one per line.\nEnd with a line saying just
\"end\".\n"
~">"
backtrace
~">"
end
=breakpoint-modified,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x0000000000400819",func="bar",file="bar.c",fullname="testsuite/bar.c",line="5",times="0",script={"backtrace"},original-location="bar"}
^done
(gdb) 
-interpreter-exec console "run"
~"Starting program: testsuite/foobar \n"
=thread-group-started,id="i1",pid="7736"
=thread-created,id="1",group-id="i1"
^running
*running,thread-id="all"
(gdb) 
=library-loaded,id="/lib64/ld-linux-x86-64.so.2",target-name="/lib64/ld-linux-x86-64.so.2",host-name="/lib64/ld-linux-x86-64.so.2",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/lib/libc.so.6",target-name="/lib/libc.so.6",host-name="/lib
/libc.so.6",symbols-loaded="0",thread-group="i1"
=breakpoint-modified,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x0000000000400819",func="bar",file="bar.c",fullname="testsuite/bar.c",line="5",times="1",script={"backtrace"},original-location="bar"}
~"\nBreakpoint "
~"1, bar (pnum=0x7fffffffe5c0, ptr=0x7fffffffe5f1 \"a' letter in
testsuite/foobar\") at bar.c:5\n"
~"5\t    int i = 0;\n"
*stopped,reason="breakpoint-hit",disp="keep",bkptno="1",frame={addr="0x0000000000400819",func="bar",args=[{name="pnum",value="0x7fffffffe5c0"},{name="ptr",value="0x7fffffffe5f1
\"a' letter in
testsuite/foobar\""}],file="bar.c",fullname="testsuite/bar.c",line="5"},thread-id="1",stopped-threads="all",core="0"
(gdb) 
quit
&"quit\n"
=thread-exited,id="1",group-id="i1"
=thread-group-exited,id="i1"
$

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]