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]

Re: [rfc] Remove deprecated_selected_frame


Daniel Jacobowitz wrote:

> Every reference to the global selected frame is either replaced by
> get_selected_frame (if we know the program is running) or
> deprecated_safe_get_selected_frame (if we're not sure).  This removes
> a class of bugs caused by lazy creation of the selected frame, several
> of which Debian users have reported to me.  It also simplifies some
> other frame cleanups.

I'm getting this now when building insight:

gcc -c -g -O2    -I. -I/usr/src/sourceware/gdb
-I/usr/src/sourceware/gdb/config
-DLOCALEDIR="\"/usr/local/share/locale\"" -DHAVE_CONFIG_H
-I/usr/src/sourceware/gdb/../include/opcode
-I/usr/src/sourceware/gdb/../readline/.. -I../bfd
-I/usr/src/sourceware/gdb/../bfd -I/usr/src/sourceware/gdb/../include  
-DMI_OUT=1 -DGDBTK -DTUI=1  -Wall -Wdeclaration-after-statement
-Wpointer-arith -Wformat-nonliteral -Wno-unused -Wno-switch -Werror
-I/usr/src/sourceware/gdb/../libgui/src 
-I/usr/src/sourceware/itcl/itcl/generic    \
         -I/usr/src/sourceware/tcl/generic
-I/usr/src/sourceware/tk/generic 
-I"/usr/src/sourceware/tk/xlib"            \
         /usr/src/sourceware/gdb/gdbtk/generic/gdbtk-cmds.c            
\
        -DGDBTK_LIBRARY=\"/usr/local/share/insight1.0\"
/usr/src/sourceware/gdb/gdbtk/generic/gdbtk-cmds.c: In function
`gdb_loc':
/usr/src/sourceware/gdb/gdbtk/generic/gdbtk-cmds.c:2133: error:
`deprecated_selected_frame' undeclared (first use in this function)
/usr/src/sourceware/gdb/gdbtk/generic/gdbtk-cmds.c:2133: error: (Each
undeclared identifier is reported only once
/usr/src/sourceware/gdb/gdbtk/generic/gdbtk-cmds.c:2133: error: for each
function it appears in.)
make: *** [gdbtk-cmds.o] Error 1

It looks like there are about a dozen more references in
gdbtk/generic/gdbtk-{cmds,hooks,register,stack}.c.  Most of them seem to
be the "if (deprecated_selected_frame != NULL)" sort of thing -- is this
safe to just replace with "if (get_selected_frame (NULL))" ?

Brian


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