forked from Imagelibrary/binutils-gdb
* findvar.c (read_register_gen): Add "target byte-order" comment.
Wed Apr 17 17:09:48 1991 Jim Kingdon (kingdon at cygint.cygnus.com)
* i386-tdep.c (i386_get_frame_setup): Use SWAP_TARGET_AND_HOST
before returning locals or slocals.
* i386-tdep.c (i386_follow_jump): Do not add data16 to pos in
call to codestream_seek; add one to pos if (and only if)
we are dealing with a jump with data16 == 1 (i.e. 0x66, 0xe9).
Mon Apr 15 12:04:32 1991 Jim Kingdon (kingdon at cygint.cygnus.com)
* valops.c (call_function_by_hand): Put dummy1 in target order
before FIX_CALL_DUMMY.
* tm-i386v.h (FIX_CALL_DUMMY): Don't depend on host byte order.
Sun Apr 14 11:55:19 1991 Jim Kingdon (kingdon at cygint.cygnus.com)
* valops.c (push_word): Add SWAP_TARGET_AND_HOST.
* remote.c (remote_open): Send '+' before calling putpkt().
* tm-i386v.h (REGISTER_VIRTUAL_TYPE): Return pointer to void,
not int, for pc, fp, and sp.
* remote.c (remote_open): Call start_remote after putpkt("?");
This commit is contained in:
10
gdb/valops.c
10
gdb/valops.c
@@ -511,6 +511,7 @@ push_word (sp, buffer)
|
||||
{
|
||||
register int len = sizeof (REGISTER_TYPE);
|
||||
|
||||
SWAP_TARGET_AND_HOST (&buffer, len);
|
||||
#if 1 INNER_THAN 2
|
||||
sp -= len;
|
||||
write_memory (sp, (char *)&buffer, len);
|
||||
@@ -671,6 +672,9 @@ call_function_by_hand (function, nargs, args)
|
||||
register CORE_ADDR sp;
|
||||
register int i;
|
||||
CORE_ADDR start_sp;
|
||||
/* CALL_DUMMY is an array of words (REGISTER_TYPE), but each word
|
||||
in in host byte order. It is switched to target byte order before calling
|
||||
FIX_CALL_DUMMY. */
|
||||
static REGISTER_TYPE dummy[] = CALL_DUMMY;
|
||||
REGISTER_TYPE dummy1[sizeof dummy / sizeof (REGISTER_TYPE)];
|
||||
CORE_ADDR old_sp;
|
||||
@@ -717,6 +721,8 @@ call_function_by_hand (function, nargs, args)
|
||||
/* Create a call sequence customized for this function
|
||||
and the number of arguments for it. */
|
||||
bcopy (dummy, dummy1, sizeof dummy);
|
||||
for (i = 0; i < sizeof dummy / sizeof (REGISTER_TYPE); i++)
|
||||
SWAP_TARGET_AND_HOST (&dummy1[i], sizeof (REGISTER_TYPE));
|
||||
FIX_CALL_DUMMY (dummy1, start_sp, funaddr, nargs, args,
|
||||
value_type, using_gcc);
|
||||
|
||||
@@ -1104,7 +1110,9 @@ value_struct_elt (argp, args, name, static_memfuncp, err)
|
||||
{
|
||||
arg1_as_ptr = *argp;
|
||||
*argp = value_ind (*argp);
|
||||
COERCE_ARRAY (*argp);
|
||||
/* Don't coerce fn pointer to fn and then back again! */
|
||||
if (TYPE_CODE (VALUE_TYPE (*argp)) != TYPE_CODE_FUNC)
|
||||
COERCE_ARRAY (*argp);
|
||||
t = VALUE_TYPE (*argp);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user