From: Michael Snyder <msnyder@cygnus.com>
To: Andrew Cagney <ac131313@cygnus.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [rfc] more findvar harvard fixes
Date: Mon, 24 Sep 2001 11:22:00 -0000 [thread overview]
Message-ID: <3BAF79C1.4265D840@cygnus.com> (raw)
In-Reply-To: <3BACFE82.7020104@cygnus.com>
Andrew Cagney wrote:
>
> Hello,
>
> The attached patch follows through a few harvard architecture problems
> Nick Duffek and Jim Blandy worked though in the recent thread:
>
> http://sources.redhat.com/ml/gdb-patches/2001-07/msg00382.html
>
> Given I think I'm just finishing these changes, I think this is pretty
> obvious so I'll check it in in a few days.
>
> Look ok to people.
>
> Andrew
Looks reasonably sane to me. ;-)
>
> ----------------------------------------------------------------------------------------------------
> 2001-09-22 Andrew Cagney <ac131313@redhat.com>
>
> * findvar.c (read_var_value): For LOC_INDIRECT and LOC_REF_ARG
> convert the pointer into a CORE_ADDRs.
>
> Index: findvar.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/findvar.c,v
> retrieving revision 1.22
> diff -p -r1.22 findvar.c
> *** findvar.c 2001/08/01 18:39:23 1.22
> --- findvar.c 2001/09/22 21:00:33
> *************** read_var_value (register struct symbol *
> *** 471,488 ****
> break;
>
> case LOC_INDIRECT:
> ! /* The import slot does not have a real address in it from the
> ! dynamic loader (dld.sl on HP-UX), if the target hasn't begun
> ! execution yet, so check for that. */
> ! if (!target_has_execution)
> ! error ("\
> Attempt to access variable defined in different shared object or load module when\n\
> addresses have not been bound by the dynamic loader. Try again when executable is running.");
>
> ! addr = SYMBOL_VALUE_ADDRESS (var);
> ! addr = read_memory_unsigned_integer
> ! (addr, TARGET_PTR_BIT / TARGET_CHAR_BIT);
> ! break;
>
> case LOC_ARG:
> if (frame == NULL)
> --- 471,491 ----
> break;
>
> case LOC_INDIRECT:
> ! {
> ! /* The import slot does not have a real address in it from the
> ! dynamic loader (dld.sl on HP-UX), if the target hasn't
> ! begun execution yet, so check for that. */
> ! CORE_ADDR locaddr;
> ! struct value *loc;
> ! if (!target_has_execution)
> ! error ("\
> Attempt to access variable defined in different shared object or load module when\n\
> addresses have not been bound by the dynamic loader. Try again when executable is running.");
>
> ! locaddr = SYMBOL_VALUE_ADDRESS (var);
> ! loc = value_at (lookup_pointer_type (type), locaddr, NULL);
> ! addr = value_as_pointer (loc);
> ! }
>
> case LOC_ARG:
> if (frame == NULL)
> *************** addresses have not been bound by the dyn
> *** 494,508 ****
> break;
>
> case LOC_REF_ARG:
> ! if (frame == NULL)
> ! return 0;
> ! addr = FRAME_ARGS_ADDRESS (frame);
> ! if (!addr)
> ! return 0;
> ! addr += SYMBOL_VALUE (var);
> ! addr = read_memory_unsigned_integer
> ! (addr, TARGET_PTR_BIT / TARGET_CHAR_BIT);
> ! break;
>
> case LOC_LOCAL:
> case LOC_LOCAL_ARG:
> --- 497,515 ----
> break;
>
> case LOC_REF_ARG:
> ! {
> ! struct value *ref;
> ! CORE_ADDR argref;
> ! if (frame == NULL)
> ! return 0;
> ! argref = FRAME_ARGS_ADDRESS (frame);
> ! if (!argref)
> ! return 0;
> ! argref += SYMBOL_VALUE (var);
> ! ref = value_at (lookup_pointer_type (type), argref, NULL);
> ! addr = value_as_pointer (ref);
> ! break;
> ! }
>
> case LOC_LOCAL:
> case LOC_LOCAL_ARG:
next prev parent reply other threads:[~2001-09-24 11:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-09-22 14:11 Andrew Cagney
2001-09-24 11:22 ` Michael Snyder [this message]
2001-09-24 12:56 ` Andrew Cagney
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=3BAF79C1.4265D840@cygnus.com \
--to=msnyder@cygnus.com \
--cc=ac131313@cygnus.com \
--cc=gdb-patches@sources.redhat.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