This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Markus Deuling wrote:
I've checked all of those in, except for the i386-tdep.c one:
@@ -169,6 +169,8 @@ i386_register_name (int regnum)
static int
i386_dbx_reg_to_regnum (int reg)
{
+ struct gdbarch *gdbarch = get_frame_arch (get_current_frame ());
+
/* This implements what GCC calls the "default" register map
(dbx_register_map[]). */
You should not call get_current_frame at this point; this might in fact fail as there is not necessarily a current frame selected at the point this callback is called.
Instead, you should change the XXX_reg_to_regnum gdbarch entries from type "f" to "m"; then the functions will be automatically provided with a gdbarch parameter. (This should be a separate patch from the remaining trivial current_gdbarch replacements.)
-- Markus Deuling GNU Toolchain for Linux on Cell BE deuling@de.ibm.com
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |