This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Constify thread name return path
- From: sergiodj+buildbot at redhat dot com
- To: gdb-testers at sourceware dot org
- Date: Thu, 26 Nov 2015 10:56:22 -0500
- Subject: [binutils-gdb] Constify thread name return path
- Authentication-results: sourceware.org; auth=none
*** TEST RESULTS FOR COMMIT 73ede76585a987a07fbd67a7474b193e4ca05517 ***
Author: Simon Marchi <simon.marchi@ericsson.com>
Branch: master
Commit: 73ede76585a987a07fbd67a7474b193e4ca05517
Constify thread name return path
Since this code path returns a string owned by the target (we don't know how
it's allocated, could be a static read-only string), it's safer if we return
a constant string. If, for some reasons, the caller wishes to modify the
string, it should make itself a copy.
gdb/ChangeLog:
* linux-nat.c (linux_nat_thread_name): Constify return value.
* target.h (struct target_ops) <to_thread_name>: Likewise.
(target_thread_name): Likewise.
* target.c (target_thread_name): Likewise.
* target-delegates.c (debug_thread_name): Regenerate.
* python/py-infthread.c (thpy_get_name): Constify local variables.
* thread.c (print_thread_info): Likewise.
(thread_find_command): Likewise.
- Follow-Ups:
- Failures on Debian-s390x-native-gdbserver-m64, branch master
- Failures on RHEL-s390x-m64, branch master
- Failures on Fedora-x86_64-m32, branch master
- Failures on Fedora-i686, branch master
- Failures on Debian-i686, branch master
- Failures on AIX-POWER7-plain, branch master
- Failures on Debian-s390x-native-extended-gdbserver-m64, branch master
- Failures on Fedora-x86_64-cc-with-index, branch master
- Failures on Fedora-x86_64-native-extended-gdbserver-m32, branch master
- Failures on Fedora-s390x-m64, branch master
- Failures on Debian-x86_64-native-extended-gdbserver-m64, branch master
- Failures on Fedora-x86_64-native-extended-gdbserver-m64, branch master
- Failures on Fedora-x86_64-native-gdbserver-m32, branch master
- Failures on Debian-i686-native-extended-gdbserver, branch master
- Failures on Fedora-ppc64be-cc-with-index, branch master
- Failures on Fedora-ppc64be-m64, branch master
- Failures on Fedora-ppc64be-native-gdbserver-m64, branch master
- Failures on Fedora-ppc64be-native-extended-gdbserver-m64, branch master
- Failures on Fedora-ppc64le-native-extended-gdbserver-m64, branch master
- Failures on Fedora-ppc64le-cc-with-index, branch master
- Failures on Fedora-ppc64le-native-gdbserver-m64, branch master
- Failures on Fedora-ppc64le-m64, branch master