From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3309 invoked by alias); 11 Dec 2002 00:17:20 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 3300 invoked from network); 11 Dec 2002 00:17:19 -0000 Received: from unknown (HELO hydra.ubicom.com) (4.20.168.98) by sources.redhat.com with SMTP; 11 Dec 2002 00:17:19 -0000 Received: FROM jaguar.scenix_engr BY hydra.ubicom.com ; Tue Dec 10 16:16:03 2002 -0800 Received: from ubicom.com by jaguar.scenix_engr (SMI-8.6/SMI-SVR4) id QAA24161; Tue, 10 Dec 2002 16:17:12 -0800 Received: (from natg@localhost) by ubicom.com (8.11.6/8.11.6) id gBB0HBp18696; Tue, 10 Dec 2002 16:17:11 -0800 Date: Tue, 10 Dec 2002 16:17:00 -0000 From: Nat Gurumoorthy Message-Id: <200212110017.gBB0HBp18696@ubicom.com> To: gdb@sources.redhat.com Subject: Proposal for customization of output of "to_pid_to_str" op in remote.c. Cc: nickk@ubicom.com X-SW-Source: 2002-12/txt/msg00177.txt.bz2 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