This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: breaking at for-loop test line
- From: Daniel Jacobowitz <drow at false dot org>
- To: gdb at sources dot redhat dot com
- Date: Tue, 3 Aug 2004 14:51:42 -0400
- Subject: Re: breaking at for-loop test line
- References: <4108321A.6070306@eecs.berkeley.edu> <20040729152940.GA7326@nevyn.them.org> <20040729185840.A6412132DF@grayscale.canids> <20040730073116.GA4446@ata.cs.hacettepe.edu.tr> <20040730082306.39EA7DEB67@spot.canids>
On Fri, Jul 30, 2004 at 01:23:05AM -0700, Felix Lee wrote:
> Baurjan Ismagulov <ibr@ata.cs.hun.edu.tr>:
> > On Thu, Jul 29, 2004 at 11:58:40AM -0700, Felix Lee wrote:
> > > how about just that. something like "asm 30" that will print all
> > > the machine instructions that correspond to line 30 of the
> > > source.
> >
> > Do you mean something like the following?
> >
> > (gdb) info line 223
> > Line 223 of "main.c" starts at address 0x804e384 <main+64>
> > and ends at 0x804e3a0 <main+92>.
> > (gdb) disas 0x804e384 0x804e3a0
>
> yeah, but it would be nice to take into account code optimization
> and exclude instructions in that range that aren't relevant to
> line 223. but I don't know if there's enough debugging
> information to do that.
There is. We may want to "fix" the output of info line. What it is
right now is the first group of contiguous instructions in the line;
later groups are ignored.
--
Daniel Jacobowitz