Villmow, Micah
2011-Jun-01 01:00 UTC
[LLVMdev] Question about debugging dwarf generated by LLVM
Say I have the following program and dwarf line number table. Program: kernel void nbt03( global uint *ip ) { size_t groupSize = get_local_size(0); for (int i=0; i < 256; ++i) { *ip += groupSize; } } Line Number Statements: Extended opcode 2: set Address to 0x38 Special opcode 6: advance Address by 0 to 0x38 and Line by 1 to 2 Set column to 40 Extended opcode 2: set Address to 0x3e Special opcode 6: advance Address by 0 to 0x3e and Line by 1 to 3 Set column to 16 Extended opcode 2: set Address to 0x4c Special opcode 7: advance Address by 0 to 0x4c and Line by 2 to 5 Set column to 25 Extended opcode 2: set Address to 0x54 Special opcode 6: advance Address by 0 to 0x54 and Line by 1 to 6 Set column to 30 Extended opcode 2: set Address to 0x60 Special opcode 4: advance Address by 0 to 0x60 and Line by -1 to 5 Set column to 1 Extended opcode 2: set Address to 0x67 Special opcode 8: advance Address by 0 to 0x67 and Line by 3 to 8 Extended opcode 2: set Address to 0x8e Advance PC by 0 to 8e Extended opcode 1: End of Sequence Address 0x60(italics) refers to the ++i in the for loop, if the beginning of the for loop jumps to a location,say 0x44, that is between 0x3e and 0x4c(bolded numbers), what line number should the debugger display on the screen? There is really three options 1) Should the debugger use line 3 as it was the line number specified before the target address? 2) Should the debugger use line 5 as it is the line number specified after the target address? 3) The debugger should use the current line number because no line number commands exist for address 0x44? As I am by no means an expert on debugging, I need advice from more experience developers. Also if it is possible to point me to any spec/documentation that might be useful to cite in the future for resolving this types of issues, it would be greatly appreciated. Thanks, Micah -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110531/d362af15/attachment.html>
Possibly Parallel Threads
- [LLVMdev] Very slow performance of lli on x86
- 20 commits - libswfdec/swfdec_as_function.c libswfdec/swfdec_as_string.c libswfdec/swfdec_initialize.as libswfdec/swfdec_initialize.h libswfdec/swfdec_load_object_as.c libswfdec/swfdec_movie_as_drawing.c libswfdec/swfdec_player_as.c
- libswfdec/swfdec_initialize.as libswfdec/swfdec_initialize.h
- 19 commits - libswfdec/swfdec_audio_event.c libswfdec/swfdec_bits.c libswfdec/swfdec_color.c libswfdec/swfdec_color.h libswfdec/swfdec_flv_decoder.c libswfdec/swfdec_image.c libswfdec/swfdec_initialize.as libswfdec/swfdec_initialize.h
- 13 commits - libswfdec-gtk/Makefile.am libswfdec-gtk/swfdec_gtk_keys.c libswfdec-gtk/swfdec_gtk_keys.h libswfdec-gtk/swfdec_gtk_widget.c libswfdec/Makefile.am libswfdec/swfdec_as_types.c libswfdec/swfdec.h libswfdec/swfdec_initialize.as