* [RFA] dwarf2 read_reg
@ 2004-06-08 4:08 Martin M. Hunt
2004-06-08 7:53 ` Mark Kettenis
0 siblings, 1 reply; 2+ messages in thread
From: Martin M. Hunt @ 2004-06-08 4:08 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 342 bytes --]
The read_reg() function made an assumption that sizeof pointer
was the same as a register size. This broke lots of things
for architectures like mips.
2004-05-26 Martin Hunt <hunt@redhat.com>
* dwarf2-frame.c (read_reg): Use register_size() instead
of sizeof pointer.
--
Martin M. Hunt <hunt@redhat.com>
Red Hat Inc.
[-- Attachment #2: 040526-1-dwarf2_frame.diff --]
[-- Type: text/x-patch, Size: 653 bytes --]
Index: gdb/dwarf2-frame.c
===================================================================
RCS file: /cvs/cvsfiles/gnupro/gdb/dwarf2-frame.c,v
retrieving revision 1.4.2.1
diff -u -p -u -r1.4.2.1 dwarf2-frame.c
--- gdb/dwarf2-frame.c 20 May 2004 03:46:47 -0000 1.4.2.1
+++ gdb/dwarf2-frame.c 25 May 2004 23:29:11 -0000
@@ -214,8 +214,8 @@ read_reg (void *baton, int reg)
buf = (char *) alloca (register_size (gdbarch, regnum));
frame_unwind_register (next_frame, regnum, buf);
- return extract_typed_address (buf, builtin_type_void_data_ptr);
+ return extract_signed_integer (buf, register_size (current_gdbarch, regnum));
}
static void
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [RFA] dwarf2 read_reg
2004-06-08 4:08 [RFA] dwarf2 read_reg Martin M. Hunt
@ 2004-06-08 7:53 ` Mark Kettenis
0 siblings, 0 replies; 2+ messages in thread
From: Mark Kettenis @ 2004-06-08 7:53 UTC (permalink / raw)
To: hunt; +Cc: gdb-patches
From: "Martin M. Hunt" <hunt@redhat.com>
Date: Mon, 07 Jun 2004 21:08:31 -0700
The read_reg() function made an assumption that sizeof pointer
was the same as a register size. This broke lots of things
for architectures like mips.
2004-05-26 Martin Hunt <hunt@redhat.com>
* dwarf2-frame.c (read_reg): Use register_size() instead
of sizeof pointer.
And your patch makes the assumption that addresses are signed, which
breaks architectures where addesses are unsigned.
Mark
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-06-08 7:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-08 4:08 [RFA] dwarf2 read_reg Martin M. Hunt
2004-06-08 7:53 ` Mark Kettenis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox