public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
From: Steven Johnson <sjohnson@sakuraindustries.com>
To: "insight@sources.redhat.com" <insight@sources.redhat.com>
Subject: Re: Problem with "file" command from CVS_HEAD
Date: Tue, 17 May 2005 14:54:00 -0000	[thread overview]
Message-ID: <428B3AFA.70401@sakuraindustries.com> (raw)
In-Reply-To: <428A79EE.4080307@sakuraindustries.com>

[-- Attachment #1: Type: text/plain, Size: 1675 bytes --]

OK,

Take 3.

Now i believe this is the final patch required.

I have added comments for Changelog, and i believe i have tracked all 
issues i previously listed.

gdb_loc is the same as before, it return the address of entry_point when 
there are no registers as current $pc.  Seems fine, and the most 
appropriate default.

The problem i listed as 1.c) about the pop up showing: (Internal error: 
pc 0x0 in read in psymtab, but not in symtab.).  Was actually through a 
side effect causing error 1.b) the 3 Drop downs present under the button 
bar for file, function and mode failing to appear.  I get rid of the pop 
up warning box, and the 3 drop downs re-appear, strange i know.  My 
presumption is that the error box was preventing a sequence of code 
executing.

All of the other problem were because I had a number of GDB debug flags 
set to 1.  The messages generated by these debug flags being enabled 
confused insight and produced the rest of my reported problems.

That was certainly "a trap for young players".  And took me most of the 
night to identify.  Its far from intuitive that debug flags will cause 
bugs in their own right.

Word of warning to everyone. GDB debug flags are incompatible with 
insight.  If you need to use them, use --nw find your problem, fix it, 
and disable the debug flags "before" worrying about insight.  Otherwise 
you will get all sorts of strange results. And you might end up pulling 
your hair out for days before identifying what i just did as the cause.

So no patch required to fix 2.b-2.g of my second report, as they are all 
caused by GDB debug message options being enabled.

Comments or Criticisms?

Steven Johnson



[-- Attachment #2: insight-6.3.50-gdb_loc-no-registers-V3.patch --]
[-- Type: text/x-patch, Size: 2590 bytes --]

diff -Naur gdb-6.3/gdb/gdbtk/ChangeLog gdb-6.3-modified/gdb/gdbtk/ChangeLog
--- gdb-6.3/gdb/gdbtk/ChangeLog	2005-05-15 21:49:09.000000000 -1100
+++ gdb-6.3-modified/gdb/gdbtk/ChangeLog	2005-05-18 01:29:21.811674459 -1100
@@ -1,3 +1,14 @@
+2005-05-18  Steven Johnson <sjohnson@sakuraindustries.com>
+
+	* generic/gdbtk-cmds.c (gdb_loc): Handle gdb_loc called before
+	remote target connected, where gdb_loc is to return $pc, default
+	$pc to entry point of program in question.
+	* library/interface.tcl (gdbtk_tcl_warning): Filter GDB Warning:
+	(Internal error: [address] in read in psymtab, but not in symtab)
+	When it occurs, it occurs excessively and otherwise makes 
+	debugging all but impossible.  There is also little an end user
+	can do with the information presented by the Warning.
+
 2005-04-28  Ben Elliston  <bje@au.ibm.com>
 
 	* generic/gdbtk-interp.c (gdbtk_interpreter_exec): Return struct
diff -Naur gdb-6.3/gdb/gdbtk/generic/gdbtk-cmds.c gdb-6.3-modified/gdb/gdbtk/generic/gdbtk-cmds.c
--- gdb-6.3/gdb/gdbtk/generic/gdbtk-cmds.c	2005-05-15 21:49:09.000000000 -1100
+++ gdb-6.3-modified/gdb/gdbtk/generic/gdbtk-cmds.c	2005-05-18 01:18:58.650064928 -1100
@@ -2114,8 +2114,18 @@
 
   if (objc == 1)
     {
-      if (deprecated_selected_frame
-	  && (get_frame_pc (deprecated_selected_frame) != read_pc ()))
+      /* This function can be called, before the target is properly
+         set-up, the following prevents an error, by trying to
+         read_pc when there is no pc to read. It defaults pc, 
+         before the target is connected to the entry point of the
+         program */
+      if (!target_has_registers)
+        {
+          pc = entry_point_address ();
+          sal = find_pc_line (pc, 0);
+        }  
+      else if (deprecated_selected_frame
+	       && (get_frame_pc (deprecated_selected_frame) != read_pc ()))
         {
           /* Note - this next line is not correct on all architectures.
 	     For a graphical debugger we really want to highlight the 
diff -Naur gdb-6.3/gdb/gdbtk/library/interface.tcl gdb-6.3-modified/gdb/gdbtk/library/interface.tcl
--- gdb-6.3/gdb/gdbtk/library/interface.tcl	2005-05-15 21:49:09.000000000 -1100
+++ gdb-6.3-modified/gdb/gdbtk/library/interface.tcl	2005-05-18 01:17:22.266403377 -1100
@@ -364,6 +364,7 @@
 # add the message at the beginning of the switch followed by - 
 
   switch -regexp $message {
+        "\(Internal error:.*in read in psymtab, but not in symtab\)" -
         "Unable to find dynamic linker breakpoint function.*" {return}
         default {show_warning $message}
        }

  parent reply	other threads:[~2005-05-17 14:54 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-16  5:58 Steven Johnson
2005-05-16 13:01 ` Accounts
2005-05-16 23:39   ` Keith Seitz
2005-05-17  1:07     ` Steven Johnson
2005-05-17  8:23       ` Steven Johnson
2005-05-17 14:54       ` Steven Johnson [this message]
2005-05-27  2:27         ` Keith Seitz
2005-05-27  3:51       ` [patch/ping] " Steven Johnson
2005-06-06 13:46       ` Steven Johnson
2005-06-06 19:53         ` Keith Seitz
2005-06-06 22:47           ` GDB Internal Errors/other messages Steven Johnson
2005-06-07  0:48             ` Keith Seitz
2005-06-07  1:13               ` [PATCH]: Ignore warnings (was Re: GDB Internal Errors/other messages.) Keith Seitz
2005-06-07  1:16                 ` Keith Seitz
2005-06-11 23:53               ` Numerous Warnings for RTTI Symbol Not Found Vale Group
2005-06-12 17:47                 ` Keith Seitz
2005-06-12 21:47                   ` Vale Group
2005-06-14  0:21                     ` Keith Seitz
2005-05-16 22:02 ` Problem with "file" command from CVS_HEAD Steven Johnson

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=428B3AFA.70401@sakuraindustries.com \
    --to=sjohnson@sakuraindustries.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).