[Skyeye-developer] adding tracepoints support to skyeye
kang shuo
blackfin.kang at gmail.com
Wed Jan 31 10:29:50 CST 2007
Great for your patch and such a detailed document. I will test them
later. I have a helloworld package in the attachment for each platform
supported by SkyEye. That maybe helpful for the test of debug function
of SkyEye.I had verified and test gdb debug by these testcases.
Compiling these helloworld for different platform you have to get
their toolchains and their gdb.
I also thought about how to auto-test debug functions in SkyEye. Now
we can auto -run testcases in skyeye testsuite-2.1.So that is easy to
test our source tree before we do some release.
- Thanks
- Michael.Kang
On 1/31/07, zied guermazi <guermazi_zied at yahoo.com> wrote:
> Hi
> This is an implementation of the tracepoints in skyeye
> simulator. attached the svn diff file and a short
> description of the current implementation status. it
> was tested with the arm simulator but not with other
> processors
> B.R.
> Zied Guermazi
>
> status of the current implementation
>
> 1- command parser
> 1.1 - create tracepoint supported
> 1.2 - enable tracepoint
> 1.3 - disable tracepoint
> 1.4 - passcount supported
> 1.5 - collect registers action supported
> 1.6 - collect memory action supported
> 1.7 - collect expression not supported
> 1.8 - while stepping supported
> 1.9 - start experiment supported
> 1.10- stop experiment supported
> 1.11- init experiment supported
> 1.12- get trace status supported
> 1.13- find snapshot by snapshot number supported
> 1.14- find snapshot by tracepoint number supported
> 1-15- find snapshot by pc address supported
> 1.16- find snapshot outside pc range not supported
> 1.17- find snapshot inside pc range not supported
> 1.18- mark a region as read only supported
>
> 2- tracepoints processing
>
> - the current implementation support up to 16 tracepoints.
> - adding, removing, enabling and disabling tracepoints is supported
> - starting and stopping tracing is supported
> - memory and register collection, while stepping and passcount are supported
> - expression collection is not supported
> - find a snapshot by snapshot number and by tracepoint number is supported
> - find a snapshot by pc, inside and outside a range is not supported
> - getting memory and registers content from snapshot is supported
> - getting memory from ro memory is supported
>
> implementation details
>
> 1- data structures
> 1-1- tracepoints list
>
> tracepoints are stored on an array, each enty is a tracepoint definition.
> a tracepoint definition consists of the tp number, tp address, a pointer to the actions, tp status, passcount, remaing pass and remainig steps.
>
> the actions are implemented as a binary tree, each node holds its own data (type and action definition), a pointer to the next action (sibling action) and a pointer to the included actions in case of a while stepping definition (child action).
>
> an action can be a collect action (registers, memory or expression) - and in this case the child node should be null - or a while-stepping action.
>
> 1-2- frame buffers list
>
> frame buffers is implemented as a linked list, each elements holds the related tracepoint number, the frame buffer number, a pointer to the recorded data list, and a pointer to the next frame buffer.
>
> record data list is a linked list, each element has a pointer to the related collect action, a pointer to the collected data, the length of the collected data and a pinter to the next record.
>
> 1-3- ro regions list
> this is a lisked list, each element defines a ro region.
>
> 2- interface
>
> here is a short description of the important functions
>
> 2-1 int decode_Q_packet (char *buffer, char *response)
> 2-2 void decode_DP_packet(char * buffer, char * response)
> 2-3 void decode_Frame_packet(char *buffer, char* response)
> 2-4 decode_ro_packet (char *buffer,char *response)
>
> 2-5 void init_tracepoints ()
>
> 2-6 int add_tracepoint (unsigned int tp_number,unsigned int tp_address)
> 2-7 action* prepare_action(int tp_id, action *parent_action)
> 2-8 void add_ro_region(unsigned int start, unsigned int end);
> 2-9 int is_in_ro_region(unsigned int addr, int length);
>
> 2-10 void start_trace_recording ();
> 2-11 void stop_trace_recording ();
> 2-12 void start_trace_focusing ();
> 2-13 void stop_trace_focusing ();
>
> 2-14 void handle_tracepoint(int i);
>
> 2-15 int select_frame_buffer_by_tpn (int tracepoint_number, int *frame_number);
> 2-16 int select_frame_buffer_by_fn (int *tracepoint_number, int frame_number);
>
> 2-17 void trace_fetch_registers(int regno, unsigned char *memory);
> 2-18 int trace_read (unsigned int addr, unsigned char *buffer, int size);
>
>
>
>
>
> _______________________________________________
> Skyeye-developer mailing list
> Skyeye-developer at lists.gro.clinux.org
> http://lists.gro.clinux.org/cgi-bin/mailman/listinfo/skyeye-developer
>
>
>
>
More information about the Skyeye-developer
mailing list