From: Markus Deuling <deuling@de.ibm.com>
To: GDB Patches <gdb-patches@sourceware.org>
Cc: Ulrich Weigand <uweigand@de.ibm.com>
Subject: Patch: Fix handling for TYPE_CODE_INT in valops.c
Date: Thu, 22 Feb 2007 14:57:00 -0000 [thread overview]
Message-ID: <45DDAF29.9000105@de.ibm.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 737 bytes --]
Hi,
I've seen errors when debugging a SPU target.
Accessing e.g. a variable by its address failes:
(gbd) p test_var
$2 = 5
(gdb) x/x &test_var
0x2b50 <test_var.4254>: 0x00000005
(gdb) p *0x2b50
Cannot access memory at address 0x2b50
The architecture specific callback integer_to_address() isn't called, so that's why in this case 0x2b50 isn't converted to a combined address as it should. The patch calls value_as_address instead of value_as_long to handle a TYPE_CODE_INT.
Running the test suite showed no regressions both on x86 and SPU.
Ok to commit ?
ChangeLog:
* valops.c (value_ind): Fix unary * handling
of TYPE_CODE_INT.
Regards,
Markus
--
Markus Deuling
GNU Toolchain for Linux on Cell BE
deuling@de.ibm.com
[-- Attachment #2: diff-fix-valops --]
[-- Type: text/plain, Size: 505 bytes --]
diff -urN src/gdb/valops.c dev/gdb/valops.c
--- src/gdb/valops.c 2007-01-09 18:58:59.000000000 +0100
+++ dev/gdb/valops.c 2007-02-22 14:41:04.000000000 +0100
@@ -934,7 +934,7 @@
BUILTIN_TYPE_LONGEST would seem to be a mistake. */
if (TYPE_CODE (base_type) == TYPE_CODE_INT)
return value_at_lazy (builtin_type_int,
- (CORE_ADDR) value_as_long (arg1));
+ (CORE_ADDR) value_as_address (arg1));
else if (TYPE_CODE (base_type) == TYPE_CODE_PTR)
{
struct type *enc_type;
next reply other threads:[~2007-02-22 14:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-22 14:57 Markus Deuling [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-02-22 14:33 Markus Deuling
2007-02-22 14:57 ` Daniel Jacobowitz
2007-02-22 15:15 ` Ulrich Weigand
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=45DDAF29.9000105@de.ibm.com \
--to=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