* RFC: Wrong calls to an undefined update in srcwin.itb
@ 2000-12-30 0:16 Fernando Nasser
2001-01-02 20:28 ` Fernando Nasser
0 siblings, 1 reply; 2+ messages in thread
From: Fernando Nasser @ 2000-12-30 0:16 UTC (permalink / raw)
To: Insight List
When I started a second Source Window I noticed an error message in the
debug window caused by an attempt to execute an undefined "update"
method.
There is a second condition of this that happens if one interrupts a
download
(or it fails).
I believe these were supposed to be calls to the Tk update command that
did not had their namespace corrected. I don't think "idletasks" make
sense
in either case.
The attached patch seems to fix the problem.
ChangeLog
* srcwin.itb (_build_win, download_progress): Calls to "update" must
refer
to the global namespace.
Index: srcwin.itb
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/srcwin.itb,v
retrieving revision 1.6
diff -c -p -r1.6 srcwin.itb
*** srcwin.itb 2000/12/07 20:14:02 1.6
--- srcwin.itb 2000/12/30 07:59:10
*************** body SrcWin::_build_win {} {
*** 150,156 ****
# If this is a new widget and the program is
# not yet being debugged, load the file with "main" in it.
if {$gdb_running} {
! update
} else {
if {[set linespec [gdbtk_locate_main]] != ""} {
location BROWSE_TAG $linespec
--- 150,156 ----
# If this is a new widget and the program is
# not yet being debugged, load the file with "main" in it.
if {$gdb_running} {
! ::update
} else {
if {[set linespec [gdbtk_locate_main]] != ""} {
location BROWSE_TAG $linespec
*************** body SrcWin::download_progress { section
*** 229,235 ****
if {$last_done == $tot || $section == "CANCEL"} {
$_toolbar configure -runstop normal
if {!$gdb_loaded} {
! update
# errored or canceled
if {$msg != ""} {
set_status "DOWNLOAD FAILED: $msg"
--- 229,235 ----
if {$last_done == $tot || $section == "CANCEL"} {
$_toolbar configure -runstop normal
if {!$gdb_loaded} {
! ::update
# errored or canceled
if {$msg != ""} {
set_status "DOWNLOAD FAILED: $msg"
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: RFC: Wrong calls to an undefined update in srcwin.itb
2000-12-30 0:16 RFC: Wrong calls to an undefined update in srcwin.itb Fernando Nasser
@ 2001-01-02 20:28 ` Fernando Nasser
0 siblings, 0 replies; 2+ messages in thread
From: Fernando Nasser @ 2001-01-02 20:28 UTC (permalink / raw)
To: Insight List
Fernando Nasser wrote:
>
> When I started a second Source Window I noticed an error message in the
> debug window caused by an attempt to execute an undefined "update"
> method.
>
That happens to be a bug, and it is at least one year old.
Tom uncovered it when he reactivated the multiple source windows code.
If GDB is already running the program, an additional window will come
up empty (if GDB is not running it is filled with main() so this problem
does not occur).
This "update" is not supposed to be "::update" but "_update".
It was a little more than adding an underscore but everything seems to
be
working really smooth now. I am checking it in.
> There is a second condition of this that happens if one interrupts a
> download
> (or it fails).
>
This one seem to be a "::update" indeed.
Revised patch:
ChangeLog
* library/srcwin.itb (_build_win): If gdb is running a program, load
the
window with source for that location (if available).
(download_progress): Calls to "update" must refer to the global
namespace.
--
Fernando Nasser
Red Hat Canada Ltd. E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9
Index: srcwin.itb
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/srcwin.itb,v
retrieving revision 1.6
diff -c -p -r1.6 srcwin.itb
*** srcwin.itb 2000/12/07 20:14:02 1.6
--- srcwin.itb 2001/01/03 04:16:29
*************** body SrcWin::_build_win {} {
*** 150,156 ****
# If this is a new widget and the program is
# not yet being debugged, load the file with "main" in it.
if {$gdb_running} {
! update
} else {
if {[set linespec [gdbtk_locate_main]] != ""} {
location BROWSE_TAG $linespec
--- 150,160 ----
# If this is a new widget and the program is
# not yet being debugged, load the file with "main" in it.
if {$gdb_running} {
! if {[catch {gdb_loc} loc]} {
! # Nothing we can do but leave the window empty.
! } else {
! _update $loc
! }
} else {
if {[set linespec [gdbtk_locate_main]] != ""} {
location BROWSE_TAG $linespec
*************** body SrcWin::download_progress { section
*** 229,235 ****
if {$last_done == $tot || $section == "CANCEL"} {
$_toolbar configure -runstop normal
if {!$gdb_loaded} {
! update
# errored or canceled
if {$msg != ""} {
set_status "DOWNLOAD FAILED: $msg"
--- 233,239 ----
if {$last_done == $tot || $section == "CANCEL"} {
$_toolbar configure -runstop normal
if {!$gdb_loaded} {
! ::update
# errored or canceled
if {$msg != ""} {
set_status "DOWNLOAD FAILED: $msg"
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-01-02 20:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-12-30 0:16 RFC: Wrong calls to an undefined update in srcwin.itb Fernando Nasser
2001-01-02 20:28 ` Fernando Nasser
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).