Bug 9508

Summary: 32-bit addresses miscalculated on 64-bit platform.
Product: gdb Reporter: mostrows
Component: expAssignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED OBSOLETE    
Severity: enhancement CC: gdb-prs, sergiodj, tromey
Priority: P3    
Version: unknown   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:

Description mostrows 2008-01-10 19:18:01 UTC
[Converted from Gnats 2403]

I try to access some target program symbols and fail:

(gdb) p buf
multi-thread:target_xfer_partial (2, (null), 0x299f020,  0x0,  0x1ff960950, 4) = 0
Cannot access memory at address 0xff960950

Note that gdb is trying to look up address 0x1ff960950, not
0xff960950.  Obviously this fails as it is not a 32-bit address that is valid in this program.

The addition that overflows the 32-bit address space is at findvar.c:496.

Release:
unknown

Environment:
GDB build and runs on x86-64-linux, debuggin x86-32 bit app.
Comment 1 Tom Tromey 2012-02-06 15:38:19 UTC
(In reply to comment #0)
> [Converted from Gnats 2403]

> The addition that overflows the 32-bit address space is at findvar.c:496.

gdb has changed a lot since 2008.
A diff or even just pasting the function in question here might help a bit.
A test case would be superb.
Comment 2 Sergio Durigan Junior 2014-09-12 22:40:45 UTC
Closing as OBSOLETE due to lack of response.  Feel free to reopen if it is still valid.