[Skyeye-developer] adding tracepoints support to skyeye

kang shuo blackfin.kang at gmail.com
Wed Jan 31 14:22:24 CST 2007


hi, I can not apply your patch on svn head. There is output message in
the following :
###################################
ksh at ksh:~/cvs/skyeye/trunk> cat ../patch/tracepoints.diff |patch -p1 --dry-run
patching file utils/debugger/gdbserver.c
Hunk #1 FAILED at 157.
Hunk #2 FAILED at 375.
Hunk #3 FAILED at 488.
Hunk #4 FAILED at 967.
Hunk #5 FAILED at 986.
Hunk #6 FAILED at 1010.
6 out of 6 hunks FAILED -- saving rejects to file utils/debugger/gdbserver.c.rej
patching file utils/debugger/gdb_tracepoint.c
patching file utils/debugger/gdb_tracepoint.h
patching file utils/debugger/skyeye2gdb.h
Hunk #1 FAILED at 26.
1 out of 1 hunk FAILED -- saving rejects to file utils/debugger/skyeye2gdb.h.rej
patching file arch/arm/common/armemu.c
Hunk #1 succeeded at 305 with fuzz 2.
patching file arch/arm/common/arm_arch_interface.c
Hunk #1 FAILED at 104.
1 out of 1 hunk FAILED -- saving rejects to file
arch/arm/common/arm_arch_interface.c.rej
patching file Makefile
Hunk #2 FAILED at 230.
Hunk #3 succeeded at 321 with fuzz 2 (offset -45 lines).
1 out of 3 hunks FAILED -- saving rejects to file Makefile.rej

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