* [RFA] core_addr_string and core_addr_to_string_nz
@ 2002-02-12 21:10 Keith Seitz
2002-02-12 21:59 ` Andrew Cagney
0 siblings, 1 reply; 3+ messages in thread
From: Keith Seitz @ 2002-02-12 21:10 UTC (permalink / raw)
To: gdb-patches
Hi,
I would like to change the current core_addr_to_string and add a new
core_add_to_string_nz so that these functions parallel the usage of phex
and phex_nz.
Since Insight is the only client for these, there are no test regressions
anywhere.
Keith
ChangeLog
2002-02-12 Keith Seitz <keiths@redhat.com>
* defs.h (core_addr_to_string_nz): New function.
* utils.c (core_addr_to_string): Use phex instead of phex_nz.
(core_addr_to_string_nz): New function.
Patch
Index: defs.h
===================================================================
RCS file: /cvs/src/src/gdb/defs.h,v
retrieving revision 1.77
diff -p -r1.77 defs.h
*** defs.h 2002/02/10 04:08:41 1.77
--- defs.h 2002/02/13 04:58:48
*************** extern char *phex_nz (ULONGEST l, int si
*** 692,697 ****
--- 692,698 ----
core_addr_to_string() can be passed direct to
string_to_core_addr(). */
extern const char *core_addr_to_string (const CORE_ADDR addr);
+ extern const char *core_addr_to_string_nz (const CORE_ADDR addr);
extern CORE_ADDR string_to_core_addr (const char *my_string);
extern void fprintf_symbol_filtered (struct ui_file *, char *,
Index: utils.c
===================================================================
RCS file: /cvs/src/src/gdb/utils.c,v
retrieving revision 1.63
diff -p -r1.63 utils.c
*** utils.c 2002/02/10 04:08:42 1.63
--- utils.c 2002/02/13 04:58:49
*************** core_addr_to_string (const CORE_ADDR add
*** 2476,2481 ****
--- 2476,2490 ----
{
char *str = get_cell ();
strcpy (str, "0x");
+ strcat (str, phex (addr, sizeof (addr)));
+ return str;
+ }
+
+ const char *
+ core_addr_to_string_nz (const CORE_ADDR addr)
+ {
+ char *str = get_cell ();
+ strcpy (str, "0x");
strcat (str, phex_nz (addr, sizeof (addr)));
return str;
}
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [RFA] core_addr_string and core_addr_to_string_nz
2002-02-12 21:10 [RFA] core_addr_string and core_addr_to_string_nz Keith Seitz
@ 2002-02-12 21:59 ` Andrew Cagney
2002-02-12 22:07 ` Keith Seitz
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Cagney @ 2002-02-12 21:59 UTC (permalink / raw)
To: Keith Seitz; +Cc: gdb-patches
> 2002-02-12 Keith Seitz <keiths@redhat.com>
>
> * defs.h (core_addr_to_string_nz): New function.
> * utils.c (core_addr_to_string): Use phex instead of phex_nz.
> (core_addr_to_string_nz): New function.
>
>
Ok (utils no longer has a maintainer so filling in gaps like this should
be pretty straignt forward).
Andrew
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFA] core_addr_string and core_addr_to_string_nz
2002-02-12 21:59 ` Andrew Cagney
@ 2002-02-12 22:07 ` Keith Seitz
0 siblings, 0 replies; 3+ messages in thread
From: Keith Seitz @ 2002-02-12 22:07 UTC (permalink / raw)
To: Andrew Cagney; +Cc: gdb-patches
On Wed, 13 Feb 2002, Andrew Cagney wrote:
> > 2002-02-12 Keith Seitz <keiths@redhat.com>
> >
> > * defs.h (core_addr_to_string_nz): New function.
> > * utils.c (core_addr_to_string): Use phex instead of phex_nz.
> > (core_addr_to_string_nz): New function.
> >
> >
> Ok (utils no longer has a maintainer so filling in gaps like this should
> be pretty straignt forward).
Wow! What response. (Hey, it's awefully late in Toronto!)
Thank you very much for the quick turn around.
Keith
PS. That means I've committed it.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-02-13 6:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-12 21:10 [RFA] core_addr_string and core_addr_to_string_nz Keith Seitz
2002-02-12 21:59 ` Andrew Cagney
2002-02-12 22:07 ` Keith Seitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox