#testcase for default option.
#Run nm command and input the main symbol address to addr2line.
set output [binutils_run $NM "$opts tmpdir/testprog$exe"]
-if ![regexp -line "^(\[0-9a-fA-F\]+)? +T ${dot}main" $output contents] then {
+if ![regexp -line "^(\[0-9a-fA-F\]+)? +\[Tt\] ${dot}main" $output contents] then {
fail "$testname"
} else {
set list [regexp -inline -all -- {\S+} $contents]
#testcase for -f option.
#Run nm command and input the fn function symbol address to addr2line.
-if ![regexp -line "^(\[0-9a-fA-F\]+)? +T ${dot}fn" $output contents] then {
+if ![regexp -line "^(\[0-9a-fA-F\]+)? +\[Tt\] ${dot}fn" $output contents] then {
fail "$testname -f option"
} else {
set list [regexp -inline -all -- {\S+} $contents]
set exec_output [binutils_run $NM "$NMFLAGS $objfile"]
set exec_output [prune_warnings $exec_output]
- if {![regexp {^([0-9a-fA-F]+)?[ ]+[TD] main} $exec_output] \
- && ![regexp {^([0-9a-fA-F]+)?[ ]+T _main} $exec_output]} {
+ if {![regexp {^([0-9a-fA-F]+)?[ ]+[TtDd] _?main} $exec_output]} {
fail $test
return
}
regsub "^\[0-9a-fA-F\]+\[ \]+T Main\[\n\r\]+" $exec_output "" exec_output
}
- if {![regexp {^([0-9a-fA-F]+)?[ ]+[TD] main} $exec_output] \
- && ![regexp {^([0-9a-fA-F]+)?[ ]+[TD] _main} $exec_output]} {
+ if {![regexp {^([0-9a-fA-F]+)?[ ]+[TtDd] _?main} $exec_output]} {
fail $test1
return
}
%_minidebug: %
$(NM) -D $< -P --defined-only | $(AWK) '{ print $$1 }' | sort > $<.dsyms
- $(NM) $< -P --defined-only | $(AWK) '{ if ($$2 == "T" || $$2 == "t" || $$2 == "D") print $$1 }' | sort > $<.fsyms
+ $(NM) $< -P --defined-only | $(AWK) '{ if ($$2 == "T" || $$2 == "t" || $$2 == "D" || $$2 == "d") print $$1 }' | sort > $<.fsyms
$(COMM) -13 $<.dsyms $<.fsyms > $<.keepsyms
$(OBJCOPY) --only-keep-debug $< $<.dbg
$(OBJCOPY) -S --remove-section .gdb_index --remove-section .comment --keep-symbols=$<.keepsyms $<.dbg $<.mdbg
@HAVE_MINIDEBUG_TRUE@@NATIVE_TRUE@%_minidebug: %
@HAVE_MINIDEBUG_TRUE@@NATIVE_TRUE@ $(NM) -D $< -P --defined-only | $(AWK) '{ print $$1 }' | sort > $<.dsyms
-@HAVE_MINIDEBUG_TRUE@@NATIVE_TRUE@ $(NM) $< -P --defined-only | $(AWK) '{ if ($$2 == "T" || $$2 == "t" || $$2 == "D") print $$1 }' | sort > $<.fsyms
+@HAVE_MINIDEBUG_TRUE@@NATIVE_TRUE@ $(NM) $< -P --defined-only | $(AWK) '{ if ($$2 == "T" || $$2 == "t" || $$2 == "D" || $$2 == "d") print $$1 }' | sort > $<.fsyms
@HAVE_MINIDEBUG_TRUE@@NATIVE_TRUE@ $(COMM) -13 $<.dsyms $<.fsyms > $<.keepsyms
@HAVE_MINIDEBUG_TRUE@@NATIVE_TRUE@ $(OBJCOPY) --only-keep-debug $< $<.dbg
@HAVE_MINIDEBUG_TRUE@@NATIVE_TRUE@ $(OBJCOPY) -S --remove-section .gdb_index --remove-section .comment --keep-symbols=$<.keepsyms $<.dbg $<.mdbg