public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
From: Fernando Nasser <fnasser@redhat.com>
To: Insight List <insight@sources.redhat.com>
Subject: Re: RFC: Wrong calls to an undefined update in srcwin.itb
Date: Tue, 02 Jan 2001 20:28:00 -0000	[thread overview]
Message-ID: <3A52AA0B.C005883F@redhat.com> (raw)
In-Reply-To: <3A4D99A3.593869F4@redhat.com>

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"

      reply	other threads:[~2001-01-02 20:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-12-30  0:16 Fernando Nasser
2001-01-02 20:28 ` Fernando Nasser [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3A52AA0B.C005883F@redhat.com \
    --to=fnasser@redhat.com \
    --cc=insight@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).