Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [BUG:MI] -break-list doesn't list multiple breakpoints
@ 2008-01-10 22:08 Nick Roberts
  2008-01-11 17:36 ` Vladimir Prus
  0 siblings, 1 reply; 20+ messages in thread
From: Nick Roberts @ 2008-01-10 22:08 UTC (permalink / raw)
  To: gdb-patches


I have previously mentioned this in

       http://sourceware.org/ml/gdb-patches/2007-11/msg00276.html

breakpoint.c currently has:

      if (b->loc 
	  && (b->loc->next || !b->loc->enabled))
	  && !ui_out_is_mi_like_p (uiout))
	{
	  struct bp_location *loc;
	  int n = 1;
	  for (loc = b->loc; loc; loc = loc->next, ++n)
	    print_one_breakpoint_location (b, loc, n, last_addr);
	}

where presumably the !ui_out_is_mi_like_p (uiout) bit is there because the
testsuite failed without it, i.e., so that -break-insert only reports one
breakpoint (the CLI command "break" doesn't use print_one_breakpoint_location).

Unfortunately -break-list also uses print_one_breakpoint_location which means
for a template function used with int and float you get something like:

(gdb) 
-break-list
^done,BreakpointTable={nr_rows="1",nr_cols="6",hdr=[{width="7",alignment="-1",col_name="number",colhdr="Num"},{width="14",alignment="-1",col_name="type",colhdr="Type"},{width="4",alignment="-1",col_name="disp",colhdr="Disp"},{width="4",alignment="-1",col_name="enabled",colhdr="Enb"},{width="10",alignment="-1",col_name="addr",colhdr="Address"},{width="40",alignment="2",col_name="what",colhdr="What"}],body=[bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="<MULTIPLE>",times="0"}]}

instead of:

(gdb) 
-break-list
^done,BreakpointTable={nr_rows="1",nr_cols="6",hdr=[{width="7",alignment="-1",col_name="number",colhdr="Num"},{width="14",alignment="-1",col_name="type",colhdr="Type"},{width="4",alignment="-1",col_name="disp",colhdr="Disp"},{width="4",alignment="-1",col_name="enabled",colhdr="Enb"},{width="10",alignment="-1",col_name="addr",colhdr="Address"},{width="40",alignment="2",col_name="what",colhdr="What"}],body=[bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="<MULTIPLE>",times="0"},bkpt={number="1.1",type="",disp="",enabled="y",addr="0x08048776",func="int minimum<int>(int, int)",file="template.cc",fullname="/home/nickrob/C++/template.cc",line="11"},bkpt={number="1.2",type="",disp="",enabled="y",addr="0x0804879f",func="float minimum<float>(float, float)",file="template.cc",fullname="/home/nickrob/C++/template.cc",line="11"}]}


So there is currently no way in MI to see these extra breakpoint locations.

While it will take a long time to fully migrate Emacs to MI, I can certainly
start reducing the dependency on CLI commands like "info break" now.  But
only if they have full functionality.

On a more general note, in Emacs, I just just use "info break" after every user
command and will probably just use "-break-list" in the future.  I won't use
the output of -break-insert, although some front end might be clever enough to
do this and that presumably was the intention when the command was written.
In that case it might be necessary to include all the locations in a multiple
breakpoint in the output.

Support for CLI in frontends can only be dropped after MI is fully
functional, it makes no sense to to do it before.

-- 
Nick                                           http://www.inet.net.nz/~nickrob


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2008-02-01 20:15 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-10 22:08 [BUG:MI] -break-list doesn't list multiple breakpoints Nick Roberts
2008-01-11 17:36 ` Vladimir Prus
2008-01-11 21:34   ` Nick Roberts
2008-01-11 22:55     ` Daniel Jacobowitz
2008-01-11 23:38       ` Nick Roberts
2008-01-15 17:08         ` Vladimir Prus
2008-01-15 21:38           ` Nick Roberts
2008-01-13 21:26       ` Nick Roberts
2008-01-29 19:16         ` Daniel Jacobowitz
2008-01-29 22:53           ` Nick Roberts
2008-01-29 23:31             ` Daniel Jacobowitz
2008-01-30  0:52               ` Nick Roberts
2008-01-30  3:04               ` Nick Roberts
2008-01-30  3:20                 ` Daniel Jacobowitz
2008-01-30  5:59                   ` Vladimir Prus
2008-01-30  7:14                     ` Nick Roberts
2008-01-30  7:32                       ` Vladimir Prus
2008-01-30  7:50                         ` Nick Roberts
2008-01-30  7:58                           ` Vladimir Prus
2008-02-01 20:15                   ` Marc Khouzam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox