From: Elena Zannoni <ezannoni@redhat.com>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: Kevin Buettner <kevinb@redhat.com>, gdb-patches@sources.redhat.com
Subject: Re: [RFA] dwarf2loc.c: Add missing DWARF2_REG_TO_REGNUM call
Date: Tue, 22 Apr 2003 14:15:00 -0000 [thread overview]
Message-ID: <16037.20395.87464.994345@localhost.redhat.com> (raw)
In-Reply-To: <20030421220254.GA6912@nevyn.them.org>
Daniel Jacobowitz writes:
> On Mon, Apr 21, 2003 at 02:46:53PM -0700, Kevin Buettner wrote:
> > I'm testing on a target for which DWARF2_REG_TO_REGNUM is not the
> > identity function. I found that gdb was fetching the wrong register
> > in dwarf2loc.c. The patch below fixes this problem.
> >
> > Okay?
> >
> > (This is almost obvious, but there are several choices for where this
> > call might be placed...)
>
> Hmm... this isn't my area to approve, but I believe this the right
> place for the call. dwarf_expr_read_reg already assumes that the regno
> on the stack is a DWARF-2 register number.
>
OK from my side, except, could you introduce a new variable 'regnum'?
elena
> >
> > * dwarf2loc.c (dwarf2_evaluate_loc_desc): Invoke DWARF2_REG_TO_REGNUM
> > on the DWARF2 register number prior to fetching a register.
> >
> > Index: dwarf2loc.c
> > ===================================================================
> > RCS file: /cvs/cvsfiles/devo/gdb/dwarf2loc.c,v
> > retrieving revision 2.2
> > diff -u -p -r2.2 dwarf2loc.c
> > --- dwarf2loc.c 2003/04/16 21:18:45 2.2
> > +++ dwarf2loc.c 2003/04/21 21:32:40
> > @@ -223,7 +223,8 @@ dwarf2_evaluate_loc_desc (struct symbol
> > result = dwarf_expr_fetch (ctx, 0);
> >
> > if (ctx->in_reg)
> > - retval = value_from_register (SYMBOL_TYPE (var), result, frame);
> > + retval = value_from_register (SYMBOL_TYPE (var),
> > + DWARF2_REG_TO_REGNUM (result), frame);
> > else
> > {
> > retval = allocate_value (SYMBOL_TYPE (var));
> >
>
> --
> Daniel Jacobowitz
> MontaVista Software Debian GNU/Linux Developer
next prev parent reply other threads:[~2003-04-22 14:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-21 21:47 Kevin Buettner
2003-04-21 22:02 ` Daniel Jacobowitz
2003-04-22 14:15 ` Elena Zannoni [this message]
2003-04-22 23:48 ` Kevin Buettner
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=16037.20395.87464.994345@localhost.redhat.com \
--to=ezannoni@redhat.com \
--cc=drow@mvista.com \
--cc=gdb-patches@sources.redhat.com \
--cc=kevinb@redhat.com \
/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