Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [patch] Re: -data-list-register-names regression?
       [not found] <201003171345.44000.vladimir@codesourcery.com>
@ 2010-03-17 21:38 ` Ulrich Weigand
  2010-03-17 22:37   ` Daniel Jacobowitz
  0 siblings, 1 reply; 7+ 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] 7+ messages in thread

* Re: [patch] Re: -data-list-register-names regression?
  2010-03-17 21:38 ` [patch] Re: -data-list-register-names regression? Ulrich Weigand
@ 2010-03-17 22:37   ` Daniel Jacobowitz
  2010-03-17 22:59     ` Joel Brobecker
  0 siblings, 1 reply; 7+ 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] 7+ 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; 7+ 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] 7+ 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; 7+ 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] 7+ 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; 7+ 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] 7+ 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; 7+ 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] 7+ 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; 7+ 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] 7+ messages in thread

end of thread, other threads:[~2010-03-18 15:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <201003171345.44000.vladimir@codesourcery.com>
2010-03-17 21:38 ` [patch] Re: -data-list-register-names regression? 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