From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8522 invoked by alias); 17 May 2005 08:23:16 -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 8194 invoked from network); 17 May 2005 08:23:08 -0000 Received: from unknown (HELO steven) (202.80.36.21) by sourceware.org with SMTP; 17 May 2005 08:23:09 -0000 Received: from sakuraindustries.com (localhost [127.0.0.1]) by steven (Postfix) with ESMTP id 1FF441294DD for ; Tue, 17 May 2005 19:26:28 -1100 (GMT+11) Message-ID: <428AE014.1050707@sakuraindustries.com> Date: Tue, 17 May 2005 08:23: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="------------070809070307050003030204" X-SW-Source: 2005-q2/txt/msg00072.txt.bz2 This is a multi-part message in MIME format. --------------070809070307050003030204 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 4442 OK, Take 2. The following patch provides "entry_point" as the PC if Insight has not connected to the target. This seems a much better solution than my previous attempt, as it doesnt trigger an error, and so the TCL Code doesnt need to catch it any more than it did before my change. Behaviour I now experience, which I feel are different problems: 1. If i execute "file" from a gdb script, sourced by --command: 1.a) The source window comes up with the entry point highlighted. OK. 1.b) I do not have the 3 Drop downs present under the button bar for file, function and mode. BAD 1.c) I get a pop up (a lot) with the message: (Internal error: pc 0x0 in read in psymtab, but not in symtab.). BAD Note, my entry point is the address 0x00000000. The pop up occurs so much, it makes the interface unusable. Sometimes the address it complains about is 0x00000100. This is a problem from GDB, and whatever it is will need to be suppressed, either by the code that puts the pop up up, (probably preferable, as I know from past experience that the GDB maintainers arent that interested that this message when it occurs usually means (at least in my experience) a) Nothing is wrong that is going to cause GDB too many problems, and b) it occurs so often to impede the functional use of GDB. I am preparing a patch to allow this warning to be disabled, for those who really arent interested if psymtab matches symtab or not, because it is outside of their control (like the normal end user). But I think i should also put a filter in Insight for it, so the popup doesnt happen, either way. 2. If i execute "file" from inside insight, by the menu, or by typing it in the Console window (effects are the same): 2.a)Before i execute it, after insight starts, the 3 Drop downs present under the button bar for file, function and mode are present. 2.b)When i execute it i get an error "This file can not be found or does not contain debugging information." Also, while the error box is shown, the first drop down (file list) shows "xxx," 2.c) if i press ok, then the error closes, xxx, disappears from the file list, but no file is displayed, including the entry point. 2.d) if i then select a file in the first drop down, i see that file listed, but i get my error from 1.c) above. 2.e) if i then select a function, i get the error from 2.b) again, including xxx, shown in the first drop down. 2.f) when i select ok, i get "Error: expected integer but got "read," i then have an option for a stacktrace: 2.g) the stack trace if selected is: expected integer but got "read," while executing "gdb_CA_to_TAS $addr" (object "::.srcwin0.srcwin" method "::SrcWin::location" body line 46) invoked from within "location BROWSE_TAG $result" (object "::.srcwin0.srcwin" method "::SrcWin::goto_func" body line 19) invoked from within "::.srcwin0.srcwin goto_func .srcwin0.srcwin.container.pane1.childsite.con.func CountDisplayableJackpots" (in namespace inscope "::SrcWin" script line 1) invoked from within "namespace inscope ::SrcWin {::.srcwin0.srcwin goto_func} .srcwin0.srcwin.container.pane1.childsite.con.func CountDisplayableJackpots" ("uplevel" body line 1) invoked from within "uplevel \#0 $options(-command) $args" (procedure "CallCommand" line 9) invoked from within "CallCommand $w $newValue" (procedure "::combobox::SetValue" line 33) invoked from within "::combobox::SetValue $widgets(this) $data" (procedure "::combobox::Select" line 8) invoked from within "::combobox::Select .srcwin0.srcwin.container.pane1.childsite.con.func [.srcwin0.srcwin.container.pane1.childsite.con.func.top.list nearest 13]" (command bound to event)errorCode is NONE I think these only now occur, because I am getting past the segfault, the only behaviour which differs in the above from my previous fix is 1.a) which in the previous fix didnt show the entry point, it showed no source at all, but otherwise everything else still occured, so I dont think this fix is responsible for these problems. I will continue to investigate these issues. Once ive tracked them down, and i can see for sure they are unrelated or at least not cause and effect, i will resubmit this patch with appropriate changelog entries, if no one has any negative comments. Steven Johnson --------------070809070307050003030204 Content-Type: text/x-patch; name="insight-6.3.50-gdb_loc-no-registers.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="insight-6.3.50-gdb_loc-no-registers.patch" Content-length: 1072 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-17 16:46:58.164964427 -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 --------------070809070307050003030204--