diff options
author | Andrew Cagney <cagney@redhat.com> | 2003-01-08 23:49:15 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2003-01-08 23:49:15 +0000 |
commit | dbad9d940fa38d09449054b341782a1316147ad7 (patch) | |
tree | f9b46931d83d5ebe82185fa7bddfd3cfdbcf98c6 /gdb | |
parent | 7692ea567d1189b93712c7f98540ab4be360be60 (diff) | |
download | gdb-dbad9d940fa38d09449054b341782a1316147ad7.zip gdb-dbad9d940fa38d09449054b341782a1316147ad7.tar.gz gdb-dbad9d940fa38d09449054b341782a1316147ad7.tar.bz2 |
2003-01-08 Andrew Cagney <ac131313@redhat.com>
* gdb_mbuild.sh: Edit the output of `maint print architecture'
replacing hex constants with function names and stripping leading
file name directory prefixes.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rwxr-xr-x | gdb/gdb_mbuild.sh | 22 |
2 files changed, 27 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d1355b9..c36404f 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2003-01-08 Andrew Cagney <ac131313@redhat.com> + + * gdb_mbuild.sh: Edit the output of `maint print architecture' + replacing hex constants with function names and stripping leading + file name directory prefixes. + 2003-01-08 Andrew Cagney <cagney@redhat.com> * gcore.c, i386-linux-tdep.c: Use get_frame_pc, get_next_frame and diff --git a/gdb/gdb_mbuild.sh b/gdb/gdb_mbuild.sh index a107740..49d18cf 100755 --- a/gdb/gdb_mbuild.sh +++ b/gdb/gdb_mbuild.sh @@ -279,12 +279,32 @@ EOF fail "gdb printed no output" ! -s Gdb.log grep -e internal-error Gdb.log && fail "gdb panic" 1 + echo ... cleanup ${target} + + # Create a sed script that cleans up the output from GDB. + rm -f mbuild.sed + touch mbuild.sed || exit 1 + + # Rules to replace <0xNNNN> with the corresponding function's + # name. + sed -n -e '/<0x0*>/d' -e 's/^.*<0x\([0-9a-f]*\)>.*$/0x\1/p' Gdb.log \ + | sort -u \ + | while read addr + do + func="`addr2line -f -e ./gdb/gdb -s ${addr} | sed -n -e 1p`" + test ${verbose} -gt 0 && echo "${addr} ${func}" 1>&2 + echo "s/<${addr}>/<${func}>/g" + done >> mbuild.sed + + # Rules to strip the leading paths off of file names. + echo 's/"\/.*\/gdb\//"gdb\//g' >> mbuild.sed + # Replace the build directory with a file as semaphore that stops # a rebuild. (should the logs be saved?) cd ${builddir} rm -f ${target}.tmp - mv ${target}/Gdb.log ${target}.tmp + sed -f ${target}/mbuild.sed ${target}/Gdb.log > ${target}.tmp rm -rf ${target} mv ${target}.tmp ${target} |