2012/12/13 Spencer Oliver (Code Review) <[email protected]>:
> Spencer Oliver has posted comments on this change.
>
> Change subject: gdb_server: Add gdb_tdesc_path cmd and qXfer:features:read 
> support v2
> ......................................................................
>
>
> Patch Set 1: (2 inline comments)
>
> Like Mathias patch this only solves half the problem, do you have plans to 
> sort the other bit, eg. setting the correct target registers depending on 
> arch.
>
> Until that is done i do not understand the value in this patch, please 
> correct  me if i am missing something. Do we not get the same behaviour by 
> using "set tdesc" in gdb.
>
> It may also be worth splitting the chunk writing code into its own function, 
> as i am sure in time it will be used elsewhere.
>
> ....................................................
> File src/server/gdb_server.c
> Line 98: static const char *gdb_tdesc_path;
> this probably should not be global, as it is possible to have more than one 
> target.
>
>
> ....................................................
> File src/server/gdb_server.h
> Line 39: #define QXFER_CHUNK_SIZE       (4096 - 2)
> As far as i can tell from the gdb src this value is actually based on 
> GDB_BUFFER_SIZE, if so then you could use
>  #define QXFER_CHUNK_SIZE (GDB_BUFFER_SIZE - 2)
>

After some quick search in the gdb code, I found out we should keep 4096.

As a matter of fact, target_read_alloc_1 is used to read data with qXfer reads.
This function "Start by reading up to 4K at a time" then increase the asked
value until GDB_BUFFER_SIZE (the target can still reply with less than the asked
value).

So if we want to keep it simple we just always reply qXfer with 4K chunks.

>
> --
> To view, visit http://openocd.zylin.com/1051
> To unsubscribe, visit http://openocd.zylin.com/settings
>
> Gerrit-MessageType: comment
> Gerrit-Change-Id: Ia13414f8d35a3d5e5fe17e04f52d2e19c13d8fb7
> Gerrit-PatchSet: 1
> Gerrit-Project: openocd
> Gerrit-Branch: master
> Gerrit-Owner: Franck Jullien <[email protected]>
> Gerrit-Reviewer: Spencer Oliver <[email protected]>
> Gerrit-Reviewer: jenkins

------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to