[lldb-dev] [PATCH] new utility methods in GDBRemoteCommunicationClient
Hafiz_Abid at mentor.com
Fri Jan 24 02:11:17 PST 2014
I had a quick look at the patch. It mostly looks good. Some small comments below.
+ // For packets which specify a range of output to be returned,
+ // return all of the output via a series of packets of the form
+ // <prefix>:000,<size>
+ // <prefix>:<size>,<size>
+ // <prefix>:<size>*2,<size>
+ // <prefix>:<size>*3,<size>
+ // ...
+ // until a "$l..." packet is received, indicating the end.
+ // Concatenate the results together and return in response.
I think that perhaps you can make this comment a bit more clear. Just separate what the remote target will do and what this function will do.
+ printf("max packet size %lu\n", (unsigned long)m_max_packet_size);
You forgot to remove this printf.
+ snprintf(sizeDescriptor, sizeof(sizeDescriptor), "%x,%x", offset, response_size);
+ PacketResult result = SendPacketAndWaitForResponse((payload_prefix_str + sizeDescriptor).c_str(),
When I see such packets in GDB remote log (e.g. $qXfer:features:read:64bit-core.xml:0,fff), there is a colon before offset. I don’t see it being added here. Is it supposed to be in payload_prefix_str?
I suppose after this is approved, you would be working on parsing the xml that came from the gdbserver. Would it be only for shared libraries or you are also interested in xml target description?
From: lldb-dev-bounces at cs.uiuc.edu [mailto:lldb-dev-bounces at cs.uiuc.edu] On Behalf Of Steve Pucci
Sent: 23 January 2014 21:04
To: lldb-dev at cs.uiuc.edu
Subject: [lldb-dev] [PATCH] new utility methods in GDBRemoteCommunicationClient
I'm working on better support for debugging against a remote stock gdbserver, and these are some new support methods I'm using. I'm sending this separately for easier digestion.
There are a couple of pieces:
* some lazy-evaluation members that store info listed in a qSupported response
* new method SendPacketsAndConcatenateResponses which is used for fetching fixed-size objects from the remote gdbserver by using multiple packets if necessary (first use will be to fetch shared-library XML files).
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the lldb-dev