X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fcorelow.c;h=7fb42970de4f87ba08c9416ac3065f4186a8de38;hb=a068643d69ce0f25d5f7cbdaa1d0a3211d72c081;hp=6a29d6a232864add7b835dcd10cc0c73efec07fa;hpb=dea57a626364698759d1525acf9109771d173811;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/corelow.c b/gdb/corelow.c index 6a29d6a232..7fb42970de 100644 --- a/gdb/corelow.c +++ b/gdb/corelow.c @@ -83,7 +83,7 @@ public: bool thread_alive (ptid_t ptid) override; const struct target_desc *read_description () override; - const char *pid_to_str (ptid_t) override; + std::string pid_to_str (ptid_t) override; const char *thread_name (struct thread_info *) override; @@ -985,10 +985,9 @@ core_target::read_description () return this->beneath ()->read_description (); } -const char * +std::string core_target::pid_to_str (ptid_t ptid) { - static char buf[64]; struct inferior *inf; int pid; @@ -1013,8 +1012,7 @@ core_target::pid_to_str (ptid_t ptid) return normal_pid_to_str (ptid); /* No luck. We simply don't have a valid PID to print. */ - xsnprintf (buf, sizeof buf, "
"); - return buf; + return "
"; } const char *