From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28763 invoked by alias); 17 May 2005 14:54:10 -0000 Mailing-List: contact insight-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: insight-owner@sources.redhat.com Received: (qmail 23226 invoked from network); 17 May 2005 14:50:58 -0000 Received: from unknown (HELO steven) (202.80.36.21) by sourceware.org with SMTP; 17 May 2005 14:50:59 -0000 Received: from sakuraindustries.com (localhost [127.0.0.1]) by steven (Postfix) with ESMTP id B737F1294DD for ; Wed, 18 May 2005 01:54:18 -1100 (GMT+11) Message-ID: <428B3AFA.70401@sakuraindustries.com> Date: Tue, 17 May 2005 14:54:00 -0000 From: Steven Johnson User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.6) Gecko/20040115 MIME-Version: 1.0 To: "insight@sources.redhat.com" Subject: Re: Problem with "file" command from CVS_HEAD References: <42896CAD.60504@sakuraindustries.com> <4289CFD6.6040306@sakuraindustries.com> <1116286740.4493.9.camel@lindt.uglyboxes.com> <428A79EE.4080307@sakuraindustries.com> In-Reply-To: <428A79EE.4080307@sakuraindustries.com> Content-Type: multipart/mixed; boundary="------------040408080303090709080100" X-SW-Source: 2005-q2/txt/msg00078.txt.bz2 This is a multi-part message in MIME format. --------------040408080303090709080100 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 1675 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 --------------040408080303090709080100 Content-Type: text/x-patch; name="insight-6.3.50-gdb_loc-no-registers-V3.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="insight-6.3.50-gdb_loc-no-registers-V3.patch" Content-length: 2590 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 + + * 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 * 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} } --------------040408080303090709080100--