From: Nat Gurumoorthy <natg@ubicom.com>
To: gdb@sources.redhat.com
Cc: nickk@ubicom.com
Subject: Proposal for customization of output of "to_pid_to_str" op in remote.c.
Date: Tue, 10 Dec 2002 16:17:00 -0000 [thread overview]
Message-ID: <200212110017.gBB0HBp18696@ubicom.com> (raw)
HI all,
This is a proposal to allow targets using the remote backend to
customize the output of "to_pid_to_str" operations. The changes to
src/gdb/remote.c would be as follows:
/* Convert a thread ID to a string. Returns the string in a static
buffer. */
static char *
remote_pid_to_str (ptid_t ptid)
{
static char buf[30];
#ifndef REMOTE_PID_TO_STR
sprintf (buf, "Thread %d", PIDGET (ptid));
#else
REMOTE_PID_TO_STR(buf, ptid, 30);
#endif
return buf;
}
In the target "tm-XXXX.h"
extern void my_target_pid_to_str(char *buf, ptid_t ptid, unsigned int buflength);
#define REMOTE_PID_TO_STR(buf, ptid, buflength) my_target_pid_to_str(buf, ptid, buflength)
In the target "target-tdep.c" file
void
my_target_pid_to_str(char *buf, ptid_t ptid, unsigned int buflength)
{
/* sprintf some sensible string into the provided buffer */
..
..
..
}
Currently remote.c provides all the facilities for multithreaded
debugging except for a way to print a customized name for that thread.
Is this the proper forum to discuss this idea? Do I have to file a PR
and mark it as an enhancement request?
I'd like some feedback on this proposal. Is this going to screw up
multi arch support?
Regards
Nat
next reply other threads:[~2002-12-11 0:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-10 16:17 Nat Gurumoorthy [this message]
2002-12-10 16:49 ` Daniel Jacobowitz
2002-12-10 18:24 Nat Gurumoorthy
2002-12-10 18:57 ` Christopher Faylor
2002-12-10 19:04 ` Daniel Jacobowitz
2002-12-10 19:04 ` Andrew Cagney
2002-12-11 14:52 Nat Gurumoorthy
2002-12-11 14:57 ` Daniel Jacobowitz
2002-12-11 14:55 Nat Gurumoorthy
2002-12-12 11:33 Nat Gurumoorthy
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=200212110017.gBB0HBp18696@ubicom.com \
--to=natg@ubicom.com \
--cc=gdb@sources.redhat.com \
--cc=nickk@ubicom.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