Commit df7eb636 authored by Jim Harris's avatar Jim Harris Committed by Gerrit Code Review
Browse files

Improve parsing of readelf output in process_core logic.



Sometimes readelf prepends an "fname: " note, to the line
with "psargs", and in that case just using awk with $2 does
not work.

Signed-off-by: default avatarJim Harris <james.r.harris@intel.com>
Change-Id: I6695352da641111f90be9f3e519accbf05107e91
parent 1df5899c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -82,7 +82,7 @@ function timing_finish() {
function process_core() {
	ret=0
	for core in $(find . -type f -name 'core*'); do
		exe=$(eu-readelf -n "$core" | grep psargs | awk '{ print $2 }')
		exe=$(eu-readelf -n "$core" | grep psargs | sed "s/.*psargs: \([^ \'\" ]*\).*/\1/")
		echo "exe for $core is $exe"
		if [[ ! -z "$exe" ]]; then
			if hash gdb; then