This is the mail archive of the mailing list for the Insight 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]

Re: [PATCH] Don't update registers with no valid frame


This patch should fix a recent internal_error problem that has crept up
in recent days. Try opening the Register Window with no process. Oops.


2003-02-11  Keith R Seitz  <>

        * generic/gdbtk-register.c (register_changed_p): If the selected
        frame is NULL, do not call frame_register_read, since that will
        now cause an internal error.
The code should be changed to either:

- call get_selected_frame()
- (prefered) pass the selected frame in

GDB now goes out of its way to create at least an innermost frame.


Index: gdbtk/generic/gdbtk-register.c
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-register.c,v
retrieving revision 1.14
diff -u -p -r1.14 gdbtk-register.c
--- gdbtk/generic/gdbtk-register.c 11 Feb 2003 16:08:38 -0000 1.14
+++ gdbtk/generic/gdbtk-register.c 12 Feb 2003 00:36:34 -0000
@@ -437,7 +437,8 @@ register_changed_p (int regnum, void *ar
char *raw_buffer = alloca (MAX_REGISTER_RAW_SIZE);
- if (!frame_register_read (deprecated_selected_frame, regnum, raw_buffer))
+ if (deprecated_selected_frame == NULL
+ || !frame_register_read (deprecated_selected_frame, regnum, raw_buffer))
if (memcmp (&old_regs[regnum * MAX_REGISTER_RAW_SIZE], raw_buffer,

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]