Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* RE: Breakpoints
@ 1999-12-22 13:06 David Williams
  0 siblings, 0 replies; 5+ messages in thread
From: David Williams @ 1999-12-22 13:06 UTC (permalink / raw)
  To: kevinb, 'Mark Salter'; +Cc: gdb

My question is still does GDB need to set more than one breakpoint when 
stepping through source? Thinking about it a little more GDB should have 
all of the information available to decide whether a branch will occur. It 
has the current value of all the registers (esp CCR) so it can work it out 
- the real question is does it use this information?

Dave.

----------
From: 	Mark Salter[SMTP:msalter@cygnus.com]
Sent: 	Thursday, December 23, 1999 2:09 AM
To: 	kevinb@cygnus.com
Cc: 	davidwilliams@ozemail.com.au; gdb@sourceware.cygnus.com
Subject: 	Re: Breakpoints

>>>>> Kevin Buettner writes:

> On Dec 22,  2:29pm, David Williams wrote:
>> Does GDB ever need to set more than one breakpoint when stepping through 
>> source code? I have not (as yet) seen this type of behaviour.

> Can the target do a singlestep in hardware or do you have to do
> software emulation?  If the latter, when you're stepping by machine
> instruction, you'd need two breakpoints on a conditional branch;
> one for the branch target, the other for the instruction after the
> branch.

Even in the latter case, the stub can evaluate the condition of the
branch to see which way its going to go.

--Mark




^ permalink raw reply	[flat|nested] 5+ messages in thread
[parent not found: <01BF4C88.F6D54B20.davidwilliams@ozemail.com.au>]
* Breakpoints
@ 2002-12-16 19:57 Satyavathi Malladi
  0 siblings, 0 replies; 5+ messages in thread
From: Satyavathi Malladi @ 2002-12-16 19:57 UTC (permalink / raw)
  To: gdb


Hi,
  I have compiled a program using the gcc compiler with the options -g and
-ax (-ax is the  option to enable block profiling). I am debugging the
program using gdb-5.2 . I set a breakpoint at main. When the program hits
the breakpoint, I obtained the backtrace of the program.It was as follows:
(gdb) bt
#0  main () at ex7.c:7
#1  0x400a5316 in __libc_start_main (main=0x8048a34 <main>, argc=1,
ubp_av=0xbffff594, init=0x80487ac <_init>, fini=0x804a1d0 <_fini>,
rtld_fini=0x4000d2fc <_dl_fini>, stack_end=0xbffff58c)
at ../sysdeps/generic/libc-start.c:129

Then I continued the program using the command "continue". Then the
breakpoint at main was hit again.

Program received signal SIGTRAP, Trace/breakpoint trap.
0x08048a50 in main () at ex7.c:7
Then when I tried to obtain the backtrace, I got the following output:
(gdb) bt
#0  0x08048a50 in main () at ex7.c:7
#1  0xbffff568 in ?? ()

Can someone help me figure out why this is happening.

Thanks,
Satya


^ permalink raw reply	[flat|nested] 5+ messages in thread
* gdb_indent vs. dwarf2read
@ 2003-01-27  3:10 Daniel Jacobowitz
  2003-01-27 17:30 ` Andrew Cagney
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Jacobowitz @ 2003-01-27  3:10 UTC (permalink / raw)
  To: gdb

What do people think about adding "-T bfd -T asection" to gdb_indent.sh? 
That's the majority style in current GDB, and we do it for some other
similar types.

[I'd like to re-indent dwarf2read.c, so I was looking over the results of
gdb_indent.sh on it before posting the patch.  Other churn: structs moved
from two spaces indented to the left column, which matches the general style
in GDB; and comments like:
  1) foo
     bar
reindented to
  1) foo
  bar
.  Should we slavishly obey GNU indent in this, or should I reformat the
comments by hand before posting the reindentation patch?]

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


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

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

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-12-22 13:06 Breakpoints David Williams
     [not found] <01BF4C88.F6D54B20.davidwilliams@ozemail.com.au>
     [not found] ` <991222035342.ZM17881@ocotillo.lan>
1999-12-22  7:09   ` Breakpoints Mark Salter
1999-12-22 15:49 ` Breakpoints J.T. Conklin
2002-12-16 19:57 Breakpoints Satyavathi Malladi
2003-01-27  3:10 gdb_indent vs. dwarf2read Daniel Jacobowitz
2003-01-27 17:30 ` Andrew Cagney
2003-01-27 17:43   ` Daniel Jacobowitz
2003-01-27 20:02     ` breakpoints jacques

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