gdb/2053: cache_ovly_table, read_target_long_array deal with incorrect object sizes

jmattson@vmware.com jmattson@vmware.com
Mon Dec 19 21:48:00 GMT 2005


>Number:         2053
>Category:       gdb
>Synopsis:       cache_ovly_table, read_target_long_array deal with incorrect object sizes
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Dec 19 21:48:01 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     jmattson@vmware.com
>Release:        gdb-6.3
>Organization:
>Environment:
i386 host, x86_64 target;
x86_64 host&target
>Description:
cache_ovly_table should be defined in terms of the *target's* "unsigned long" type rather than the host's "unsigned" type.

Similarly, the second argument to read_target_long_array should be a pointer to the *target's* "unsigned long" type rather than the host's "unsigned int" type.

The same argument probably applies to cache_novlys (but this is no big deal if the target is little-endian).

Currently, "overlay auto" is completely broken when the target is x86_64, whether the host is x86_64 or not, because  sizeof(unsigned long) != sizeof(unsigned int) on this platform.
>How-To-Repeat:
Try to use "overlay auto" on an x86_64 target.
>Fix:
It is possible to get things working by declaring cache_ovly_table to contain CORE_ADDRs and by changing the second argument of read_target_long_array (and the typecasts  at the two call-sites) to CORE_ADDR *.
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gdb-prs mailing list