Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Elena Zannoni <ezannoni@redhat.com>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: Elena Zannoni <ezannoni@redhat.com>,
	Michael Elizabeth Chastain <mec@shout.net>,
	Andrew Cagney <ac131313@cygnus.com>,
	gdb-patches@sources.redhat.com
Subject: Re: [RFA] import drow dbxread.c fix to branch
Date: Thu, 04 Apr 2002 12:15:00 -0000	[thread overview]
Message-ID: <15532.45816.153296.172640@localhost.redhat.com> (raw)
In-Reply-To: <20020404144007.A10769@nevyn.them.org>

Daniel Jacobowitz writes:
 > > 
 > > Take a look at the way gdbtk does it, in
 > > gdbtk/generic/gdbtk-cmd.c:gdb_disassemble_driver().
 > > Can we adopt that solution?
 > > 
 > > (I really can't wait until we can get rid of this duplication/triplication of
 > > disassembly code. I think I'll start cleaning some things up).
 > 
 > I'm not sure.  That code assumes a different meaning of line==0 than
 > the one we're using.  Particularly, if I understand correctly, the
 > meaning in gdbtk comes from a set of Cygnus-internal stabs for handling
 > live range splitting, which never made it into any public GCC and are
 > completely obsoleted by DWARF-2.  I prefer:
 > 

Yes, you are right, that code predates even gdbtk bein contributed
publically. I initially thought that it was a recent fix.


 >  > +      /* Skip any end-of-function markers.  */
 >  > +      if (le[i].line == 0)
 >  > +        continue;
 >  > +
 > 
 > 
 > to:
 > 
 >           /* GCC sometimes emits line directives with a linenumber
 >              of 0.  It does this to handle live range splitting.
 >              This may be a bug, but we need to be able to handle it.
 >              For now, use the previous instructions line number.
 >              Since this is a bit of a hack anyway, we will just lose
 >              if the bogus sline is the first line of the range.  For
 >              functions, I have never seen this to be the case.  */
 >           
 >           if (le[i].line != 0)
 >             {
 >               mle[newlines].line = le[i].line;
 >             }
 >           else
 >             {
 >               if (newlines > 0)
 >                 mle[newlines].line = mle[newlines - 1].line;
 >             }
 > 
 > 
 > i.e. skip the line, not fake up a line number for it.  It's a
 > special-purpose marker, not a generic line number.
 > 
 > If you agree with me, want me to update gdbtk's version to match?  Does
 > this same code exist in a third location?
 > 

I guess posting a patch to the insight list can do no harm. It's up to
them to approve it.

There is no real third location, but rather a third way to do
disassembly in gdb proper (disassemble_cmd).

Anyway, the code can go in for the MI part.

Elena


 > -- 
 > Daniel Jacobowitz                           Carnegie Mellon University
 > MontaVista Software                         Debian GNU/Linux Developer


  reply	other threads:[~2002-04-04 20:15 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-03 21:36 Michael Elizabeth Chastain
2002-04-03 22:01 ` Daniel Jacobowitz
2002-04-04 10:58   ` Andrew Cagney
2002-04-04 11:33   ` Elena Zannoni
2002-04-04 11:40     ` Daniel Jacobowitz
2002-04-04 12:15       ` Elena Zannoni [this message]
2002-04-04 12:24         ` Daniel Jacobowitz
2002-04-04 12:18       ` Andrew Cagney
2002-04-04 12:20         ` Daniel Berlin
2002-04-04 12:30           ` Andrew Cagney
  -- strict thread matches above, loose matches on Subject: below --
2002-04-05 13:34 Michael Elizabeth Chastain
2002-04-04 18:17 Michael Elizabeth Chastain
2002-04-04 18:36 ` Daniel Jacobowitz
2002-04-04 19:35   ` Elena Zannoni
2002-04-05 13:10     ` Jim Blandy
2002-04-05 13:16       ` Daniel Jacobowitz
2002-04-04  8:37 Michael Elizabeth Chastain
2002-04-03 20:48 Michael Elizabeth Chastain
2002-04-03 21:09 ` Daniel Jacobowitz
2002-04-01 21:36 Michael Elizabeth Chastain
2002-04-01 21:43 ` Eli Zaretskii
2002-04-03 19:43   ` Andrew Cagney
2002-04-01 11:22 Michael Elizabeth Chastain
2002-04-01 20:49 ` Eli Zaretskii
2002-04-01  8:56 Michael Elizabeth Chastain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=15532.45816.153296.172640@localhost.redhat.com \
    --to=ezannoni@redhat.com \
    --cc=ac131313@cygnus.com \
    --cc=drow@mvista.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=mec@shout.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox