|
1 // Autoload script, called by TRACE32 if symbols are to be loaded |
|
2 |
|
3 // define local macros |
|
4 local &filename &basename &progname &symfilename &filepath &code &data &space &databsslinear &basename |
|
5 |
|
6 // get filename and relocation information |
|
7 // these parameters are passed when calling this skript |
|
8 |
|
9 entry &filename &code &data &databsslinear &space |
|
10 |
|
11 // &filename: name of process/file |
|
12 // &code: text segment address |
|
13 // &data: data segment address (not used in Symbian OS) |
|
14 // &databsslinear: combined data & bss segment address |
|
15 // &space: space id of process (not used here) |
|
16 |
|
17 // get symbol file name and program name |
|
18 &basename=string.cut(&filename,-string.len(os.file.extension(&filename))) |
|
19 &symfilename="&basename"+".sym" |
|
20 &progname=os.file.name("&basename") |
|
21 |
|
22 // delete program if it already exists or other code is already there |
|
23 y.delete &code |
|
24 if y.exist("\\&progname") |
|
25 y.delete \\&progname |
|
26 |
|
27 // search file in source search path and open dialog when not there |
|
28 &filepath=y.searchfile("&symfilename") |
|
29 if !os.file("&filepath") |
|
30 ( |
|
31 local &file |
|
32 &file=os.file.name("&symfilename") |
|
33 winpos ,,,,,, filebox normal "Searching symbols for &filename" |
|
34 dialog.file "*\&file" |
|
35 entry %line &filepath |
|
36 if "&filepath"=="" |
|
37 enddo |
|
38 ) |
|
39 |
|
40 // load symbol file (options for sourcepath, e.g. /STRIPPART may need to be added when required) |
|
41 d.load.elf "&filepath" /noclear /cpp /nocode /reloc ER_RO at &code /reloc ER_RW at &databsslinear /reloc ER_ZI after ER_RW |
|
42 |
|
43 enddo |