Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Keith Seitz <keiths@redhat.com>
To: <gdb-patches@sources.redhat.com>
Subject: [RFA] core_addr_string and core_addr_to_string_nz
Date: Tue, 12 Feb 2002 21:10:00 -0000	[thread overview]
Message-ID: <Pine.GSO.4.33.0202122101380.18500-100000@makita.cygnus.com> (raw)

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;
  }


             reply	other threads:[~2002-02-13  5:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-12 21:10 Keith Seitz [this message]
2002-02-12 21:59 ` Andrew Cagney
2002-02-12 22:07   ` Keith Seitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.GSO.4.33.0202122101380.18500-100000@makita.cygnus.com \
    --to=keiths@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox