Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mark Kettenis <mark.kettenis@xs4all.nl>
To: deuling@de.ibm.com
Cc: gdb-patches@sourceware.org, uweigand@de.ibm.com
Subject: Re: [rfc] [02/05] Get rid of current_gdbarch in hppa-linux-nat.c
Date: Wed, 07 Nov 2007 11:31:00 -0000	[thread overview]
Message-ID: <200711071130.lA7BUDaD014732@brahms.sibelius.xs4all.nl> (raw)
In-Reply-To: <47319D46.8080904@de.ibm.com> (message from Markus Deuling on 	Wed, 07 Nov 2007 12:11:02 +0100)

> Date: Wed, 07 Nov 2007 12:11:02 +0100
> From: Markus Deuling <deuling@de.ibm.com>
> 
> Hi,
> 
> this patch adds gdbarch as a parameter to hppa_linux_register_addr. 
> 
> Tested with gdb_mbuild. Ok to commit ?

Actually, this is getting a bit silly.  That gdbarch is only needed
for a sanaity check, and obviously the gdbarch_num_regs call can just
be replaced with an appropriate bounds check on the u_offsets array.

   if (regno < 0 || regno >= ARRAY_SIZE(u_offsets))

should do the trick.

> ChangeLog:
> 
> 	* hppa-linux-nat.c (hppa_linux_register_addr): Add gdbarch as parameter.
> 	Replace current_gdbarch by gdbarch.
> 	(fetch_register, store_register): Update caller of
> 	hppa_linux_register_addr.


  reply	other threads:[~2007-11-07 11:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-07 11:12 Markus Deuling
2007-11-07 11:31 ` Mark Kettenis [this message]
2007-11-07 11:51   ` Markus Deuling
2007-11-07 12:58     ` Daniel Jacobowitz
2007-11-07 14:52       ` Markus Deuling
2007-11-07 15:06         ` Daniel Jacobowitz
2007-11-08 21:31         ` Ulrich Weigand
2007-11-07 13:16     ` Mark Kettenis

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=200711071130.lA7BUDaD014732@brahms.sibelius.xs4all.nl \
    --to=mark.kettenis@xs4all.nl \
    --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