This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb] gdbserver: Handle 'v' packet while processing qSymbol.
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Tue, 29 Mar 2016 20:26:01 -0400
- Subject: [binutils-gdb] gdbserver: Handle 'v' packet while processing qSymbol.
- Authentication-results: sourceware.org; auth=none
*** TEST RESULTS FOR COMMIT 28170b88cc8b40fdea2b065dafe6e1872a47ee4e ***
Author: Marcin Kocielnicki <koriakin@0x04.net>
Branch: master
Commit: 28170b88cc8b40fdea2b065dafe6e1872a47ee4e
gdbserver: Handle 'v' packet while processing qSymbol.
On powerpc64, qSymbol query may require gdb to read a function
descriptor, sending a vFile packet to gdbserver. Thus, we need
to handle 'v' packet in look_up_one_symbol.
vFile replies may be quite long, and require reallocating own_buf.
Since handle_v_requests assumes the buffer is the static global own_buf
from server.c and reallocates it, we need to make own_buf global and
use it from look_up_one_symbol instead of using our own auto variable.
I've also done the same change in relocate_instruction, just in case.
On gdb side, in remote_check_symbols, rs->buf may be clobbered by vFile
handling, yet we need its contents for the reply (the symbol name is
stored there). Allocate a new buffer instead.
This broke fast tracepoints on powerpc64, due to errors in reading IPA
symbols.
gdb/ChangeLog:
* remote.c (remote_check_symbols): Allocate own buffer for reply.
gdbserver/ChangeLog:
* remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
packets.
(relocate_instruction): Remove own_buf.
* server.c (own_buf): Make global.
(handle_v_requests): Make global.
* server.h (own_buf): New declaration.
(handle_v_requests): New prototype.