This is the mail archive of the 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]

Re: does bpstat_print stop printing prematurely?

Eli Zaretskii writes:
 > > From: Doug Evans <>
 > > Date: Mon, 15 Apr 2002 23:43:34 -0700 (PDT)
 > > 
 > > Here's a session showing how to recreate it.
 > Thanks, I reproduced the bug on my machine.  However, I don't know
 > what would it take to fix this, since I don't understand the comment
 > in bpstat_print before the offending loop.  Anybody?

Assuming one decides to print all breakpoints, either move the
control for source/frame printing into bpstat_print or pull
the loop in bpstat_print into normal_stop().

Also, in the case of pc breakpoints, there's no need to print the
source line for each one.  Printing that only once would be fine.
[maybe "printing" it multiple times would confuse programs parsing
the output]

You might even want to do a preprocessing pass and sort them.
Since bpstat_print wants to stop when it wants the caller to print
the source location (Vega, right smack dab in the middle, but I digress),
maybe the thing to do is print all non-pc-breakpoints first, then
all pc-breakpoints last, defering the source location to the last
pc breakpoint.
Maybe the preprocessing pass would be where `print_it_done' is handled
and nothing is printed, even if other breakpoints want to be printed.

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