File: buildingdummy.sh

package info (click to toggle)
dwarfutils 20201201-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 11,868 kB
  • sloc: ansic: 104,667; sh: 5,947; cpp: 4,675; python: 878; makefile: 646; awk: 11
file content (24 lines) | stat: -rw-r--r-- 790 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh
# This is a script used to create
# dummyexecutable and dummyexecutable.debug
# Just doing what objcopy provides.
# It's currently not useable for automated regression testing
# without more work to make it independent of source/build
# location.
d=dummyexecutable
cc -g $d.c -o $d
objcopy --only-keep-debug  $d $d.debug
objcopy --strip-debug      $d
objcopy --add-gnu-debuglink=$d.debug  $d
# by moving the $d.debug we ensure that
# it can only be found if the proper path is provided
# to dwdebuglink
rm -rf dummydir
mkdir -p dummydir/home/davea/dwarf/code/dwarfexample/
cp $d.debug dummydir/home/davea/dwarf/code/dwarfexample/
echo "Test1 "
/tmp/dwdebuglink $d

echo "Test2 "
/tmp/dwdebuglink --add-debuglink-path=/globala/ax --add-debuglink-path=./dummydir $d
rm -rf dummydir