From: Andrew Cagney <ac131313@cygnus.com>
To: "Insight (GDB GUI)" <insight@sourceware.cygnus.com>
Subject: RFA: gdbtk-cmds.c: use paddr_nz() to convert addr to string
Date: Sun, 10 Oct 1999 18:08:00 -0000 [thread overview]
Message-ID: <38013863.B1DA0196@cygnus.com> (raw)
Hello,
The attached patch uses paddr_nz() (and asprintf()) instead of the host
dependant "%lx" to convert an address into a string.
Ok?
Andrew
Mon Oct 11 10:19:04 1999 Andrew Cagney <cagney@b1.cygnus.com>
* gdbtk-cmds.c (gdb_get_tracepoint_info): Use paddr_nz to convert
the address into a string.
Index: gdbtk-cmds.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/gdbtk-cmds.c,v
retrieving revision 2.60
diff -p -r2.60 gdbtk-cmds.c
*** gdbtk-cmds.c 1999/10/05 18:18:12 2.60
--- gdbtk-cmds.c 1999/10/11 00:51:10
*************** gdb_get_tracepoint_info (clientData, int
*** 2121,2127 ****
struct action_line *al;
Tcl_Obj *action_list;
char *filename, *funcname, *fname;
- char tmp[19];
if (objc != 2)
{
--- 2121,2126 ----
*************** gdb_get_tracepoint_info (clientData, int
*** 2161,2169 ****
Tcl_ListObjAppendElement (interp, result_ptr->obj_ptr,
Tcl_NewIntObj (sal.line));
! sprintf (tmp, "0x%lx", tp->address);
! Tcl_ListObjAppendElement (interp, result_ptr->obj_ptr,
! Tcl_NewStringObj (tmp, -1));
Tcl_ListObjAppendElement (interp, result_ptr->obj_ptr,
Tcl_NewIntObj (tp->enabled));
Tcl_ListObjAppendElement (interp, result_ptr->obj_ptr,
--- 2160,2172 ----
Tcl_ListObjAppendElement (interp, result_ptr->obj_ptr,
Tcl_NewIntObj (sal.line));
! {
! char *tmp;
! asprintf (&tmp, "0x%s", paddr_nz (tp->address));
! Tcl_ListObjAppendElement (interp, result_ptr->obj_ptr,
! Tcl_NewStringObj (tmp, -1));
! free (tmp);
! }
Tcl_ListObjAppendElement (interp, result_ptr->obj_ptr,
Tcl_NewIntObj (tp->enabled));
Tcl_ListObjAppendElement (interp, result_ptr->obj_ptr,
next reply other threads:[~1999-10-10 18:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-10-10 18:08 Andrew Cagney [this message]
1999-10-11 10:24 ` James Ingham
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=38013863.B1DA0196@cygnus.com \
--to=ac131313@cygnus.com \
--cc=insight@sourceware.cygnus.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).