* -data-list-register-names regression? @ 2010-03-17 10:45 Vladimir Prus 2010-03-17 14:26 ` Joel Brobecker 2010-03-17 21:38 ` [patch] " Ulrich Weigand 0 siblings, 2 replies; 10+ messages in thread From: Vladimir Prus @ 2010-03-17 10:45 UTC (permalink / raw) To: gdb Hello, I've tried to use Eclipse CDT with GDB 7.0 today, and found that the registers views is totally broken, as it in does not show any registers. The version of Eclipse I have used is eclipse-cpp-galileo-SR1, which I believe is the latest official release, and the problem reproduces with current CVS HEAD. Everything works more or less fine with 6.8. The root problem is this: $ gdb/gdb -i=mi gdb/gdb ... (gdb) -data-list-register-names ^error,msg="No registers." (gdb) It seems that -data-list-register-names does not work until the application was started. In 6.8, it worked. Is this change intentional, and if so, do we care about fixing it in general or for 7.1 in particular? Thanks, -- Vladimir Prus CodeSourcery vladimir@codesourcery.com (650) 331-3385 x722 ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: -data-list-register-names regression? 2010-03-17 10:45 -data-list-register-names regression? Vladimir Prus @ 2010-03-17 14:26 ` Joel Brobecker 2010-03-17 18:51 ` Daniel Jacobowitz 2010-03-17 21:38 ` [patch] " Ulrich Weigand 1 sibling, 1 reply; 10+ messages in thread From: Joel Brobecker @ 2010-03-17 14:26 UTC (permalink / raw) To: Vladimir Prus; +Cc: gdb > I've tried to use Eclipse CDT with GDB 7.0 today, and found that the > registers views is totally broken, as it in does not show any > registers. Just for the record: I've noticed this report and will take into account the discussion in order to decide what to do for 7.1. I personally don't have an opinion, right now - I don't know what to think. On the one hand, I guess we should be able to print the list of register names even if the program hasn't started yet. On the other hand, until we do have an executable file, we don't know what the architecture is. And even so, doesn't the architecture actually depend on the frame (the case of the powerpc+spu)? Given that this was already a problem with 7.0, I propose we pass for 7.1 and consider either 7.1.1 and/or 7.2. -- Joel ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: -data-list-register-names regression? 2010-03-17 14:26 ` Joel Brobecker @ 2010-03-17 18:51 ` Daniel Jacobowitz 0 siblings, 0 replies; 10+ messages in thread From: Daniel Jacobowitz @ 2010-03-17 18:51 UTC (permalink / raw) To: Joel Brobecker; +Cc: Vladimir Prus, gdb On Wed, Mar 17, 2010 at 07:26:09AM -0700, Joel Brobecker wrote: > I personally don't have an opinion, right now - I don't know what to think. > On the one hand, I guess we should be able to print the list of register > names even if the program hasn't started yet. On the other hand, until > we do have an executable file, we don't know what the architecture is. > And even so, doesn't the architecture actually depend on the frame (the > case of the powerpc+spu)? IOW: get_current_arch. > Given that this was already a problem with 7.0, I propose we pass for > 7.1 and consider either 7.1.1 and/or 7.2. Fine with me. -- Daniel Jacobowitz CodeSourcery ^ permalink raw reply [flat|nested] 10+ messages in thread
* [patch] Re: -data-list-register-names regression? 2010-03-17 10:45 -data-list-register-names regression? Vladimir Prus 2010-03-17 14:26 ` Joel Brobecker @ 2010-03-17 21:38 ` Ulrich Weigand 2010-03-17 22:37 ` Daniel Jacobowitz 1 sibling, 1 reply; 10+ messages in thread From: Ulrich Weigand @ 2010-03-17 21:38 UTC (permalink / raw) To: gdb-patches; +Cc: gdb, vladimir, dan, brobecker Vladimir Prus wrote: > It seems that -data-list-register-names does not work until the application > was started. In 6.8, it worked. Hmm, seems this was my fault: http://sourceware.org/ml/gdb-patches/2009-06/msg00124.html I guess we can allow this again by using get_current_arch () instead of requiring the presence of a selected frame. The patch below implements this. As a side note, I'm wondering why this matters so much to Eclipse: even if we allow -data-list-register-names before the application started, Eclipse still will not be able to show register *contents*. And once the application *has* started, I'd hope Eclipse re-reads the list of register names anyway, because it might have changed from before ... Tested on powerpc-linux. Thoughts on whether we should this? Bye, Ulrich ChangeLog: * mi/mi-main.c (mi_cmd_list_thread_groups): Use get_current_arch instead of selected frame architecture. testsuite/ChangeLog: * gdb.mi/gdb680.exp: Revert 2009-06-17 change. Index: gdb/mi/mi-main.c =================================================================== RCS file: /cvs/src/src/gdb/mi/mi-main.c,v retrieving revision 1.169 diff -u -p -r1.169 mi-main.c --- gdb/mi/mi-main.c 24 Feb 2010 23:11:28 -0000 1.169 +++ gdb/mi/mi-main.c 17 Mar 2010 20:58:38 -0000 @@ -852,7 +852,6 @@ mi_cmd_list_thread_groups (char *command void mi_cmd_data_list_register_names (char *command, char **argv, int argc) { - struct frame_info *frame; struct gdbarch *gdbarch; int regnum, numregs; int i; @@ -864,8 +863,7 @@ mi_cmd_data_list_register_names (char *c In this case, some entries of gdbarch_register_name will change depending upon the particular processor being debugged. */ - frame = get_selected_frame (NULL); - gdbarch = get_frame_arch (frame); + gdbarch = get_current_arch (); numregs = gdbarch_num_regs (gdbarch) + gdbarch_num_pseudo_regs (gdbarch); cleanup = make_cleanup_ui_out_list_begin_end (uiout, "register-names"); Index: gdb/testsuite/gdb.mi/gdb680.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/gdb680.exp,v retrieving revision 1.8 diff -u -p -r1.8 gdb680.exp --- gdb/testsuite/gdb.mi/gdb680.exp 1 Jan 2010 07:32:03 -0000 1.8 +++ gdb/testsuite/gdb.mi/gdb680.exp 17 Mar 2010 20:58:39 -0000 @@ -27,7 +27,7 @@ if [mi_gdb_start] { proc do_test {count} { mi_gdb_test "-data-list-register-names -1" \ - {\^error,msg=\"No registers.\"} \ + {\^error,msg=\"bad register number\"} \ "-data-list-register-names -1, try $count" } -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [patch] Re: -data-list-register-names regression? 2010-03-17 21:38 ` [patch] " Ulrich Weigand @ 2010-03-17 22:37 ` Daniel Jacobowitz 2010-03-17 22:59 ` Joel Brobecker 0 siblings, 1 reply; 10+ messages in thread From: Daniel Jacobowitz @ 2010-03-17 22:37 UTC (permalink / raw) To: Ulrich Weigand; +Cc: gdb-patches, gdb, vladimir, brobecker On Wed, Mar 17, 2010 at 10:38:24PM +0100, Ulrich Weigand wrote: > Tested on powerpc-linux. Thoughts on whether we should this? I like this patch, and think we should use it. The IDE should be re-fetching the register names, but we don't need to be mean about it :-) -- Daniel Jacobowitz CodeSourcery ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [patch] Re: -data-list-register-names regression? 2010-03-17 22:37 ` Daniel Jacobowitz @ 2010-03-17 22:59 ` Joel Brobecker 2010-03-18 4:44 ` Dave Korn 2010-03-18 13:28 ` Ulrich Weigand 0 siblings, 2 replies; 10+ messages in thread From: Joel Brobecker @ 2010-03-17 22:59 UTC (permalink / raw) To: Daniel Jacobowitz; +Cc: Ulrich Weigand, gdb-patches, gdb, vladimir > > Tested on powerpc-linux. Thoughts on whether we should this? > > I like this patch, and think we should use it. The IDE should be > re-fetching the register names, but we don't need to be mean about it :-) Ditto. Do we want it for 7.1? -- Joel ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [patch] Re: -data-list-register-names regression? 2010-03-17 22:59 ` Joel Brobecker @ 2010-03-18 4:44 ` Dave Korn 2010-03-18 13:28 ` Ulrich Weigand 1 sibling, 0 replies; 10+ messages in thread From: Dave Korn @ 2010-03-18 4:44 UTC (permalink / raw) To: Joel Brobecker Cc: Daniel Jacobowitz, Ulrich Weigand, gdb-patches, gdb, vladimir On 17/03/2010 22:59, Joel Brobecker wrote: >>> Tested on powerpc-linux. Thoughts on whether we should this? >> I like this patch, and think we should use it. The IDE should be >> re-fetching the register names, but we don't need to be mean about it :-) > > Ditto. Do we want it for 7.1? It would be helpful, there's a major Eclipse release coming up and there might not be much time for 7.1.1 (or 7.2) before then. It would be good if the 7.1+Eclipse combination could get some solid testing before the launch date in June. cheers, DaveK ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [patch] Re: -data-list-register-names regression? 2010-03-17 22:59 ` Joel Brobecker 2010-03-18 4:44 ` Dave Korn @ 2010-03-18 13:28 ` Ulrich Weigand 2010-03-18 13:55 ` Joel Brobecker 1 sibling, 1 reply; 10+ messages in thread From: Ulrich Weigand @ 2010-03-18 13:28 UTC (permalink / raw) To: Joel Brobecker; +Cc: Daniel Jacobowitz, gdb-patches, gdb, vladimir Joel Brobecker wrote: > > > Tested on powerpc-linux. Thoughts on whether we should this? > > > > I like this patch, and think we should use it. The IDE should be > > re-fetching the register names, but we don't need to be mean about it :-) > > Ditto. Do we want it for 7.1? OK, I've checked this in to mainline now. It seems reasonable to me to put this in 7.1 as well, but I think you have final call on that ... If you'd like me to put in, please let me know. Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [patch] Re: -data-list-register-names regression? 2010-03-18 13:28 ` Ulrich Weigand @ 2010-03-18 13:55 ` Joel Brobecker 2010-03-18 15:53 ` Ulrich Weigand 0 siblings, 1 reply; 10+ messages in thread From: Joel Brobecker @ 2010-03-18 13:55 UTC (permalink / raw) To: Ulrich Weigand; +Cc: Daniel Jacobowitz, gdb-patches, gdb, vladimir > OK, I've checked this in to mainline now. It seems reasonable to me > to put this in 7.1 as well, but I think you have final call on that ... > If you'd like me to put in, please let me know. OK, if we both agree that it's safe enough to go into 7.1, then let's apply it on the branch as well. Thanks! -- Joel ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [patch] Re: -data-list-register-names regression? 2010-03-18 13:55 ` Joel Brobecker @ 2010-03-18 15:53 ` Ulrich Weigand 0 siblings, 0 replies; 10+ messages in thread From: Ulrich Weigand @ 2010-03-18 15:53 UTC (permalink / raw) To: Joel Brobecker; +Cc: Daniel Jacobowitz, gdb-patches, gdb, vladimir Joel Brobecker wrote: > > OK, I've checked this in to mainline now. It seems reasonable to me > > to put this in 7.1 as well, but I think you have final call on that ... > > If you'd like me to put in, please let me know. > > OK, if we both agree that it's safe enough to go into 7.1, then let's > apply it on the branch as well. Now checked in to the branch as well. Thanks, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2010-03-18 15:53 UTC | newest] Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2010-03-17 10:45 -data-list-register-names regression? Vladimir Prus 2010-03-17 14:26 ` Joel Brobecker 2010-03-17 18:51 ` Daniel Jacobowitz 2010-03-17 21:38 ` [patch] " Ulrich Weigand 2010-03-17 22:37 ` Daniel Jacobowitz 2010-03-17 22:59 ` Joel Brobecker 2010-03-18 4:44 ` Dave Korn 2010-03-18 13:28 ` Ulrich Weigand 2010-03-18 13:55 ` Joel Brobecker 2010-03-18 15:53 ` Ulrich Weigand
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox