This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH/RFC] Propagate 'regno' in value_subscript.
- From: Klee Dienes <klee at apple dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Sun, 10 Nov 2002 19:28:21 -0500
- Subject: [PATCH/RFC] Propagate 'regno' in value_subscript.
A side effect of the changes to value_assign is that you can no longer
assign to members of structures that are in arrays.
on i386/linux:
(gdb) print $mm5.v8_int8[0] = 10
/home/klee/source/cygnus.cygnus/gdb/arch-utils.c:448: internal-error:
generic_register_size: Assertion `regnum >= 0 && regnum < NUM_REGS +
NUM_PSEUDO_REGS' failed.
A problem internal to GDB has been detected. Further
debugging may prove unreliable.
Quit this debugging session? (y or n) n
Create a core file of GDB? (y or n) n
I suspect the core problem is that value_subscript doesn't propagate
the value of 'regno' to its result, instead setting it to -1, and we
were getting away with it before because value_assign was just using
write_register_bytes directly. The following patch fixes the problem
on both i386/linux and ppc/darwin.
Attachment:
reg-structs.txt
Description: Text document