This is the mail archive of the insight@sources.redhat.com 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: Problem with "file" command from CVS_HEAD


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


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}
        }

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