AT_KEYWORDS([debuginfo] [debugedit])
DEBUGEDIT_SETUP([-gdwarf-4])
-AT_DATA([expout],
-[/foo/bar/baz
-/foo/bar/baz/subdir_headers
-])
+$READELF --debug-dump=line foo.o subdir_bar/bar.o baz.o \
+ | grep -E -A5 "The (Directory|File Name) Table" \
+ | grep "^ [[1234]]" \
+ | sed -e "s@$(pwd)@/foo/bar/baz@" | tee expout
AT_CHECK([[debugedit -b $(pwd) -d /foo/bar/baz ./foo.o]])
AT_CHECK([[debugedit -b $(pwd) -d /foo/bar/baz ./subdir_bar/bar.o]])
AT_CHECK([[debugedit -b $(pwd) -d /foo/bar/baz ./baz.o]])
AT_CHECK([[
$READELF --debug-dump=line foo.o subdir_bar/bar.o baz.o \
- | grep -A3 "The Directory Table" | grep "^ [123]" \
- | grep /foo/ | cut -c5- | sort
+ | grep -E -A5 "The (Directory|File Name) Table" | grep "^ [1234]"
]],[0],[expout])
AT_CLEANUP
AT_SKIP_IF([test "$DWARF_5_DEBUGLINE" = "no"])
DEBUGEDIT_SETUP([-gdwarf-5])
-AT_DATA([expout],
-[foo/bar/baz
-foo/bar/baz/subdir_bar
-foo/bar/baz/subdir_headers
-])
+$READELF --debug-dump=line foo.o subdir_bar/bar.o baz.o \
+ | grep -E -A5 "The (Directory|File Name) Table" \
+ | grep "^ [[01234]]" | cut -f3 -d: \
+ | sed -e "s@$(pwd)@/foo/bar/baz@" | tee expout
AT_CHECK([[debugedit -b $(pwd) -d /foo/bar/baz ./foo.o]])
AT_CHECK([[debugedit -b $(pwd) -d /foo/bar/baz ./subdir_bar/bar.o]])
AT_CHECK([[debugedit -b $(pwd) -d /foo/bar/baz ./baz.o]])
AT_CHECK([[
$READELF --debug-dump=line foo.o subdir_bar/bar.o baz.o \
- | grep -A5 "The Directory Table" | grep "^ [0123]" \
- | cut -f2- -d/ | grep ^foo/ | sort -u
+ | grep -E -A5 "The (Directory|File Name) Table" \
+ | grep "^ [01234]" | cut -f3 -d:
]],[0],[expout])
AT_CLEANUP
AT_KEYWORDS([debuginfo] [debugedit])
DEBUGEDIT_SETUP([-gdwarf-4])
-AT_DATA([expout],
-[/foo/bar/baz
-/foo/bar/baz/subdir_headers
-])
+$READELF --debug-dump=line ./foobarbaz.part.o \
+ | grep -E -A5 "The (Directory|File Name) Table" \
+ | grep "^ [[1234]]" \
+ | sed -e "s@$(pwd)@/foo/bar/baz@" | tee expout
AT_CHECK([[debugedit -b $(pwd) -d /foo/bar/baz ./foobarbaz.part.o]])
AT_CHECK([[
$READELF --debug-dump=line ./foobarbaz.part.o \
- | grep -A3 "The Directory Table" | grep "^ [123]" \
- | grep /foo/ | cut -c5- | sort
+ | grep -E -A5 "The (Directory|File Name) Table" \
+ | grep "^ [1234]"
]],[0],[expout])
AT_CLEANUP
AT_SKIP_IF([test "$DWARF_5_DEBUGLINE" = "no"])
DEBUGEDIT_SETUP([-gdwarf-5])
-AT_DATA([expout],
-[foo/bar/baz
-foo/bar/baz/subdir_bar
-foo/bar/baz/subdir_headers
-])
+$READELF --debug-dump=line ./foobarbaz.part.o \
+ | grep -E -A5 "The (Directory|File Name) Table" \
+ | grep "^ [[01234]]" | cut -f3 -d: \
+ | sed -e "s@$(pwd)@/foo/bar/baz@" | tee expout
AT_CHECK([[debugedit -b $(pwd) -d /foo/bar/baz ./foobarbaz.part.o]])
AT_CHECK([[
$READELF --debug-dump=line ./foobarbaz.part.o \
- | grep -A5 "The Directory Table" | grep "^ [0123]" \
- | cut -f2- -d/ | grep ^foo/ | sort -u
+ | grep -E -A5 "The (Directory|File Name) Table" \
+ | grep "^ [01234]" | cut -f3 -d:
]],[0],[expout])
AT_CLEANUP
AT_KEYWORDS([debuginfo] [debugedit])
DEBUGEDIT_SETUP([-gdwarf-4])
-AT_DATA([expout],
-[/foo/bar/baz
-/foo/bar/baz/subdir_headers
-])
+$READELF --debug-dump=line ./foobarbaz.exe \
+ | grep -E -A5 "The (Directory|File Name) Table" \
+ | grep "^ [[1234]]" \
+ | sed -e "s@$(pwd)@/foo/bar/baz@" | tee expout
AT_CHECK([[debugedit -b $(pwd) -d /foo/bar/baz ./foobarbaz.exe]])
AT_CHECK([[
$READELF --debug-dump=line ./foobarbaz.exe \
- | grep -A3 "The Directory Table" | grep "^ [123]" \
- | grep /foo/ | cut -c5- | sort
+ | grep -E -A5 "The (Directory|File Name) Table" \
+ | grep "^ [1234]"
]],[0],[expout])
AT_CLEANUP
AT_SKIP_IF([test "$DWARF_5_DEBUGLINE" = "no"])
DEBUGEDIT_SETUP([-gdwarf-5])
-AT_DATA([expout],
-[foo/bar/baz
-foo/bar/baz/subdir_bar
-foo/bar/baz/subdir_headers
-])
+$READELF --debug-dump=line ./foobarbaz.exe \
+ | grep -E -A5 "The (Directory|File Name) Table" \
+ | grep "^ [[01234]]" | cut -f3 -d: \
+ | sed -e "s@$(pwd)@/foo/bar/baz@" | tee expout
AT_CHECK([[debugedit -b $(pwd) -d /foo/bar/baz ./foobarbaz.exe]])
AT_CHECK([[
$READELF --debug-dump=line ./foobarbaz.exe \
- | grep -A5 "The Directory Table" | grep "^ [0123]" \
- | cut -f2- -d/ | grep ^foo/ | sort -u
+ | grep -E -A5 "The (Directory|File Name) Table" \
+ | grep "^ [01234]" | cut -f3 -d:
]],[0],[expout])
AT_CLEANUP