Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA] findvar.c: support LOC_BASEREG[_ARG] on Harvard archs
@ 2001-07-16 10:13 Nick Duffek
  2001-07-16 11:29 ` Jim Blandy
       [not found] ` <3B535097.5040106@cygnus.com>
  0 siblings, 2 replies; 11+ messages in thread
From: Nick Duffek @ 2001-07-16 10:13 UTC (permalink / raw)
  To: jimb, ezannoni; +Cc: gdb-patches

Hi,

At the moment, GDB doesn't apply the necessary POINTER_TO_ADDRESS
translation to the base register value used for finding LOC_BASEREG and
LOC_BASEREG_ARG variables.

This patch applies that translation.  Okay to apply?

ChangeLog:

	* findvar.c (read_var_value): Filter LOC_BASEREG and
	LOC_BASEREG_ARG register values through POINTER_TO_ADDRESS.

Nick Duffek
<nsd@redhat.com>

[patch follows]

Index: gdb/findvar.c
===================================================================
diff -up gdb/findvar.c gdb/findvar.c
--- gdb/findvar.c	Mon Jul 16 12:41:21 2001
+++ gdb/findvar.c	Mon Jul 16 12:39:40 2001
@@ -612,9 +612,10 @@ addresses have not been bound by the dyn
     case LOC_BASEREG_ARG:
       {
 	char *buf = (char*) alloca (MAX_REGISTER_RAW_SIZE);
+	memset (buf, 0, MAX_REGISTER_RAW_SIZE);
 	get_saved_register (buf, NULL, NULL, frame, SYMBOL_BASEREG (var),
 			    NULL);
-	addr = extract_address (buf, REGISTER_RAW_SIZE (SYMBOL_BASEREG (var)));
+	addr = POINTER_TO_ADDRESS (builtin_type_void_data_ptr, buf);
 	addr += SYMBOL_VALUE (var);
 	break;
       }


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2001-07-16 16:17 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-16 10:13 [RFA] findvar.c: support LOC_BASEREG[_ARG] on Harvard archs Nick Duffek
2001-07-16 11:29 ` Jim Blandy
2001-07-16 14:35   ` Nick Duffek
     [not found]     ` <npsnfwy0u8.fsf@zwingli.cygnus.com>
2001-07-16 15:49       ` Andrew Cagney
2001-07-16 15:59         ` Jim Blandy
2001-07-16 16:13         ` Nick Duffek
2001-07-16 15:59       ` Nick Duffek
2001-07-16 16:09         ` Andrew Cagney
2001-07-16 16:13           ` Nick Duffek
2001-07-16 16:17           ` Nick Duffek
     [not found] ` <3B535097.5040106@cygnus.com>
2001-07-16 14:16   ` Jim Blandy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox