/[projet1]/users/mmu_man/sedoric/dinfo2sym.sh
Defence Force logotype

Contents of /users/mmu_man/sedoric/dinfo2sym.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 442 - (show annotations)
Sat Apr 2 02:42:11 2011 UTC (9 years ago) by mmu_man
File MIME type: application/x-sh
File size: 477 byte(s)
oricutron wants 4 digit addresses in symbol tables.

1 #!/bin/sh
2
3 state=n
4 name=
5 addr=
6
7 while read tok arg; do
8 #echo "[$tok][$arg]"
9 case "$tok" in
10 '};')
11 state=n
12 case "$name" in
13 sedoric|ZP|STACK|VIA|'')
14 # filter out
15 ;;
16 *)
17 # print the symbol
18 echo "$addr $name"
19 ;;
20 esac
21 name=
22 addr=
23 ;;
24 LABEL)
25 state=l
26 ;;
27 NAME)
28 name="${arg#\"}"
29 name="${name%\";}"
30 ;;
31 START|ADDR)
32 addr="${arg#$}"
33 addr="${addr%;}"
34 test "${#addr}" -eq 3 && addr="0$addr"
35 esac
36 done < "$1"
37

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26