Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* RFA: change for gdb/mi 495
@ 2002-10-21 17:07 J. Johnston
  2002-10-22  9:00 ` Elena Zannoni
  0 siblings, 1 reply; 6+ messages in thread
From: J. Johnston @ 2002-10-21 17:07 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 289 bytes --]

The following is a patch for gdb/mi 495.  The PR requests changing ui_out_field_core_addr
to use core_addr_to_string().

Ok to commit?

-- Jeff J.

gdb/ChangeLog:

2002-10-21  Jeff Johnston  <jjohnstn@redhat.com>

	* ui-out.c (ui_out_field_core_addr): Change to call core_addr_to_string().

[-- Attachment #2: 495.patch --]
[-- Type: text/plain, Size: 859 bytes --]

Index: ui-out.c
===================================================================
RCS file: /cvs/src/src/gdb/ui-out.c,v
retrieving revision 1.24
diff -u -r1.24 ui-out.c
--- ui-out.c	3 Oct 2002 22:34:58 -0000	1.24
+++ ui-out.c	22 Oct 2002 00:02:17 -0000
@@ -507,16 +507,7 @@
 			const char *fldname,
 			CORE_ADDR address)
 {
-  char addstr[20];
-
-  /* FIXME: cagney/2002-05-03: Need local_address_string() function
-     that returns the language localized string formatted to a width
-     based on TARGET_ADDR_BIT.  */
-  /* print_address_numeric (address, 1, local_stream); */
-  if (TARGET_ADDR_BIT <= 32)
-    strcpy (addstr, local_hex_string_custom (address, "08l"));
-  else
-    strcpy (addstr, local_hex_string_custom (address, "016l"));
+  const char *addstr = core_addr_to_string (address);
 
   ui_out_field_string (uiout, fldname, addstr);
 }

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: RFA: change for gdb/mi 495
  2002-10-21 17:07 RFA: change for gdb/mi 495 J. Johnston
@ 2002-10-22  9:00 ` Elena Zannoni
  2002-10-22  9:31   ` Andrew Cagney
  0 siblings, 1 reply; 6+ messages in thread
From: Elena Zannoni @ 2002-10-22  9:00 UTC (permalink / raw)
  To: J. Johnston; +Cc: gdb-patches

J. Johnston writes:
 > The following is a patch for gdb/mi 495.  The PR requests changing ui_out_field_core_addr
 > to use core_addr_to_string().
 > 
 > Ok to commit?
 > 

I think it is ok. No unexpected changes in the output, I take it.

Elena


 > -- Jeff J.
 > 
 > gdb/ChangeLog:
 > 
 > 2002-10-21  Jeff Johnston  <jjohnstn@redhat.com>
 > 
 > 	* ui-out.c (ui_out_field_core_addr): Change to call core_addr_to_string().Index: ui-out.c
 > ===================================================================
 > RCS file: /cvs/src/src/gdb/ui-out.c,v
 > retrieving revision 1.24
 > diff -u -r1.24 ui-out.c
 > --- ui-out.c	3 Oct 2002 22:34:58 -0000	1.24
 > +++ ui-out.c	22 Oct 2002 00:02:17 -0000
 > @@ -507,16 +507,7 @@
 >  			const char *fldname,
 >  			CORE_ADDR address)
 >  {
 > -  char addstr[20];
 > -
 > -  /* FIXME: cagney/2002-05-03: Need local_address_string() function
 > -     that returns the language localized string formatted to a width
 > -     based on TARGET_ADDR_BIT.  */
 > -  /* print_address_numeric (address, 1, local_stream); */
 > -  if (TARGET_ADDR_BIT <= 32)
 > -    strcpy (addstr, local_hex_string_custom (address, "08l"));
 > -  else
 > -    strcpy (addstr, local_hex_string_custom (address, "016l"));
 > +  const char *addstr = core_addr_to_string (address);
 >  
 >    ui_out_field_string (uiout, fldname, addstr);
 >  }


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: RFA: change for gdb/mi 495
  2002-10-22  9:00 ` Elena Zannoni
@ 2002-10-22  9:31   ` Andrew Cagney
  2002-10-22  9:49     ` Elena Zannoni
                       ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Andrew Cagney @ 2002-10-22  9:31 UTC (permalink / raw)
  To: Elena Zannoni; +Cc: J. Johnston, gdb-patches

> J. Johnston writes:
>  > The following is a patch for gdb/mi 495.  The PR requests changing ui_out_field_core_addr
>  > to use core_addr_to_string().
>  > 
>  > Ok to commit?
>  > 
> 
> I think it is ok. No unexpected changes in the output, I take it.

Hmm, I'd like to think about this for a bit.  Check exactly where it is 
called.

Andrew



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: RFA: change for gdb/mi 495
  2002-10-22  9:31   ` Andrew Cagney
@ 2002-10-22  9:49     ` Elena Zannoni
  2002-11-13 11:24     ` J. Johnston
  2003-01-08  0:07     ` Andrew Cagney
  2 siblings, 0 replies; 6+ messages in thread
From: Elena Zannoni @ 2002-10-22  9:49 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: Elena Zannoni, J. Johnston, gdb-patches

Andrew Cagney writes:
 > > J. Johnston writes:
 > >  > The following is a patch for gdb/mi 495.  The PR requests changing ui_out_field_core_addr
 > >  > to use core_addr_to_string().
 > >  > 
 > >  > Ok to commit?
 > >  > 
 > > 
 > > I think it is ok. No unexpected changes in the output, I take it.
 > 
 > Hmm, I'd like to think about this for a bit.  Check exactly where it is 
 > called.
 > 

In various places, but the main/easiest to check is the address at the
beginning of a disassembly line. Other calls are in the frame displaying code.

Elena



 > Andrew
 > 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: RFA: change for gdb/mi 495
  2002-10-22  9:31   ` Andrew Cagney
  2002-10-22  9:49     ` Elena Zannoni
@ 2002-11-13 11:24     ` J. Johnston
  2003-01-08  0:07     ` Andrew Cagney
  2 siblings, 0 replies; 6+ messages in thread
From: J. Johnston @ 2002-11-13 11:24 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: Elena Zannoni, gdb-patches

Andrew Cagney wrote:
> 
> > J. Johnston writes:
> >  > The following is a patch for gdb/mi 495.  The PR requests changing ui_out_field_core_addr
> >  > to use core_addr_to_string().
> >  >
> >  > Ok to commit?
> >  >
> >
> > I think it is ok. No unexpected changes in the output, I take it.
> 
> Hmm, I'd like to think about this for a bit.  Check exactly where it is
> called.
> 
> Andrew


Have you checked this out yet?

-- Jeff J.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: RFA: change for gdb/mi 495
  2002-10-22  9:31   ` Andrew Cagney
  2002-10-22  9:49     ` Elena Zannoni
  2002-11-13 11:24     ` J. Johnston
@ 2003-01-08  0:07     ` Andrew Cagney
  2 siblings, 0 replies; 6+ messages in thread
From: Andrew Cagney @ 2003-01-08  0:07 UTC (permalink / raw)
  To: Andrew Cagney, J. Johnston; +Cc: Elena Zannoni, gdb-patches

FYI,

I've updated the bug report.  There were two cases:

- code printing addresses intended for MI which should use 
core_addr_to_string()

- code printing addresses intended for the user which should use the not 
yet implemented local_address_string[_custom]() method.

Andrew


> J. Johnston writes:
>  > The following is a patch for gdb/mi 495.  The PR requests changing ui_out_field_core_addr
>  > to use core_addr_to_string().
>  >  > Ok to commit?
>  >
> I think it is ok. No unexpected changes in the output, I take it.
> 
> Hmm, I'd like to think about this for a bit.  Check exactly where it is called.
> 
> Andrew
> 
> 
> 



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-01-08  0:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-21 17:07 RFA: change for gdb/mi 495 J. Johnston
2002-10-22  9:00 ` Elena Zannoni
2002-10-22  9:31   ` Andrew Cagney
2002-10-22  9:49     ` Elena Zannoni
2002-11-13 11:24     ` J. Johnston
2003-01-08  0:07     ` Andrew Cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox