View Bug Activity | Format For Printing
[hjl@gnu-10 gcc]$ ./xgcc -B./ -g -O -c foo.c [hjl@gnu-10 gcc]$ /export/build/gnu/binutils-debug/build-i686-linux/binutils/readelf -w foo.o > /dev/null readelf: Warning: .debug_loc section has more comp units than .debug_info section readelf: Warning: assuming that the pointer size is 4, from the last comp unit in .debug_info I don't think readelf should dump .debug_loc section directly. It should use DW_AT_location in .debug_info to dump .debug_loc. One way to do it is to get a list of DW_AT_location in .debug_info first.
I will give it a try, on top of Nick's patch for bug 616.
A patch is posted at http://sources.redhat.com/ml/binutils/2004-12/msg00338.html
Hi H.J. This patch is fine - I have applied it with a few comments added and the functions slightly rearranged in order to avoid the necessity of a prototype for process_debug_info(). Cheers Nick