From: Markus Deuling <deuling@de.ibm.com>
To: GDB Patches <gdb-patches@sourceware.org>
Cc: Ulrich Weigand <uweigand@de.ibm.com>, cgf@alum.bu.edu
Subject: [rfc] [13/17] Get rid of current_gdbarch in win32-nat.c
Date: Thu, 11 Oct 2007 08:55:00 -0000 [thread overview]
Message-ID: <470DE4B6.1050708@de.ibm.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 434 bytes --]
Hi,
this patch gets rid of some of the current_gdbarch's in win32-nat.c. Maybe someone can test this? I have no idea how to :-)
Thanks a lot. Is this ok to commit?
ChangeLog:
* win32-nat.c (do_win32_fetch_inferior_registers, win32_resume)
(do_win32_store_inferior_registers): Use get_regcache_arch to get at
the current architecture by regcache.
--
Markus Deuling
GNU Toolchain for Linux on Cell BE
deuling@de.ibm.com
[-- Attachment #2: diff-win32-nat --]
[-- Type: text/plain, Size: 1190 bytes --]
diff -urpN src/gdb/win32-nat.c dev/gdb/win32-nat.c
--- src/gdb/win32-nat.c 2007-09-04 03:12:18.000000000 +0200
+++ dev/gdb/win32-nat.c 2007-10-11 10:06:39.000000000 +0200
@@ -397,7 +397,7 @@ do_win32_fetch_inferior_registers (struc
regcache_raw_supply (regcache, r, context_offset);
else
{
- for (r = 0; r < gdbarch_num_regs (current_gdbarch); r++)
+ for (r = 0; r < gdbarch_num_regs (get_regcache_arch (regcache)); r++)
do_win32_fetch_inferior_registers (regcache, r);
}
@@ -424,7 +424,7 @@ do_win32_store_inferior_registers (const
((char *) ¤t_thread->context) + mappings[r]);
else
{
- for (r = 0; r < gdbarch_num_regs (current_gdbarch); r++)
+ for (r = 0; r < gdbarch_num_regs (get_regcache_arch (regcache)); r++)
do_win32_store_inferior_registers (regcache, r);
}
}
@@ -1211,7 +1211,8 @@ win32_resume (ptid_t ptid, int step, enu
{
/* Single step by setting t bit */
win32_fetch_inferior_registers (get_current_regcache (),
- gdbarch_ps_regnum (current_gdbarch));
+ gdbarch_ps_regnum (get_regcache_arch
+ (get_current_regcache ())));
th->context.EFlags |= FLAG_TRACE_BIT;
}
next reply other threads:[~2007-10-11 8:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-11 8:55 Markus Deuling [this message]
2007-10-11 17:59 ` Christopher Faylor
2007-10-22 6:09 ` 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=470DE4B6.1050708@de.ibm.com \
--to=deuling@de.ibm.com \
--cc=cgf@alum.bu.edu \
--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