gdbserver:server.c - use unpack_varlen_hex to extract hex numbers.
authorPedro Alves <palves@redhat.com>
Tue, 19 Feb 2013 20:52:57 +0000 (20:52 +0000)
committerPedro Alves <palves@redhat.com>
Tue, 19 Feb 2013 20:52:57 +0000 (20:52 +0000)
commitaca2255198cca90893ab2ceb8f0a13854b6fc0fc
tree3fe2655199e30db928cc57047efe9a087d380d8b
parent61a672f17d6544eb69a59aaed93c9eafdba74613
gdbserver:server.c - use unpack_varlen_hex to extract hex numbers.

Addresses, as most numbers in the RSP are hex encoded, with variable
length (that just means the width isn't specified, and there's no top
cap.  So they should be extracted with unpack_varlen_hex.

A couple spots in server.c are using strto(u)l, which doesn't work on
LLP64 targets.

This patch fixes it.

Tested on x86_64 Fedora 17.

2013-02-19  Pedro Alves  <palves@redhat.com>
    Kai Tietz <ktietz@redhat.com>

PR gdb/15161

* server.c (handle_query) <CRC check>: Use unpack_varlen_hex
instead of strtoul to extract address from packet.
(process_serial_event) <'z'>: Likewise.
gdb/gdbserver/ChangeLog
gdb/gdbserver/server.c