Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Maxim Grigoriev <maxim@tensilica.com>
To: Ulrich Weigand <uweigand@de.ibm.com>
Cc: Markus Deuling <deuling@de.ibm.com>,
	  GDB Patches <gdb-patches@sourceware.org>
Subject: Re: [patch] Get rid of current_gdbarch in xtensa
Date: Tue, 20 May 2008 22:15:00 -0000	[thread overview]
Message-ID: <48330FE6.1060907@hq.tensilica.com> (raw)
In-Reply-To: <200805201532.m4KFWNcS021488@d12av02.megacenter.de.ibm.com>

Hello Ulrich and Markus,

Thanks for taking care of Xtensa.

I think xtensa_read_register() should be eliminated.
If you don't mind I can take the original Markus's patch
from here and finish and test it.

Thanks,
-- Maxim


Ulrich Weigand wrote:
> Markus Deuling wrote:
>
>   
>> @@ -2034,9 +2034,9 @@ call0_track_op (xtensa_c0reg_t dst[], xt
>>        /* 2 operands: dst, literal offset.  */
>>        gdb_assert (nods == 2);
>>        /* litbase = xtensa_get_litbase (pc); can be also used.  */
>> -      litbase = (gdbarch_tdep (current_gdbarch)->litbase_regnum == -1)
>> +      litbase = (gdbarch_tdep (gdbarch)->litbase_regnum == -1)
>>  	? 0 : xtensa_read_register
>> -		(gdbarch_tdep (current_gdbarch)->litbase_regnum);
>> +		(gdbarch_tdep (gdbarch)->litbase_regnum);
>>     
>
> There's really a different problem here: xtensa_read_register simply
> uses get_current_regcache () to retrieve that "litbase" register.
>
> This seems quite broken, in particular when call0_track_op is called
> out of the xtensa_skip_prologue code path, where the current regcache
> may not really be related at all to the function that is being
> queried ...
>
> In those cases where we have a proper frame to read from, the question
> of how to retrieve the litbase register number should resolve itself
> automatically.
>
> Maxim, do you have any suggestions how to handle this?  Is there a
> way to retrieve the "litbase" in the xtensa_skip_prologue case?
>
> Bye,
> Ulrich
>
>   


  reply	other threads:[~2008-05-20 17:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-19 15:17 Markus Deuling
2008-05-20 18:08 ` Ulrich Weigand
2008-05-20 22:15   ` Maxim Grigoriev [this message]
2008-05-20 22:23     ` Ulrich Weigand
2008-05-21 22:27   ` [commit] " Maxim Grigoriev
2008-05-23 14:44     ` Markus Deuling

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=48330FE6.1060907@hq.tensilica.com \
    --to=maxim@tensilica.com \
    --cc=deuling@de.ibm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=uweigand@de.ibm.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