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: Jim Harris <james.r.harris@intel.com> Change-Id: I6695352da641111f90be9f3e519accbf05107e91
This commit is contained in:
parent
1df5899cf5
commit
df7eb6361a
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user