since this has nothing to do with original query and
is an experiment of sorts with the labeller windbg extension that i edited in in my first answer
i am adding this as a new answer and not editing my original answer
since the question of performance of AddSyntheticSymbol for bulk Addition Came up i cooked up a small 6 figure long windbg script file that i could use to test the performance
it appears there is a logarithmic increase in the time required to add symbols
if windbg could add 500 symbols in 11 seconds on the first round
it would take 13 seconds for next 500 and
16 seconds for the third round of 500 symbols
i cut off the test when i added the 20 th round of symbols it took about 50 seconds to load the symbols 9500 to 10000
here is the small python script to cook up a windbg scriptfile
buff = []
j=0
k=1
for i in range(0,100000,1):
j=j+1
buff.append("!label str_%s %08x 1 xul\n" % ( str(i).rjust(8,'0') , i ) )
if(j == 500):
buff.append("%s %d symbols added\n" % (".echotime;.echo ",j*k))
j = 0
k = k+1
with open ("lab100k.txt","w") as txt:
txt.writelines(buff)
this creates a file with 100200 windbg commands that uses !label extcmd
wc -l lab100k.txt
100200 lab100k.txt
grep -c echotime lab100k.txt
200
tail -n 3 lab100k.txt
!label str_00099998 0001869e 1 xul
!label str_00099999 0001869f 1 xul
.echotime;.echo 100000 symbols added
loaded the label extension and executed this windbg script and cut it off after labelling 10000 address the timeframe isas follows
0:021> $$>a< lab100k.txt
Debugger (not debuggee) time: Tue Sep 22 23:58:52.053 2020
500 symbols added
Debugger (not debuggee) time: Tue Sep 22 23:59:03.468 2020
1000 symbols added
Debugger (not debuggee) time: Tue Sep 22 23:59:16.983 2020
1500 symbols added
Debugger (not debuggee) time: Tue Sep 22 23:59:32.546 2020
2000 symbols added
Debugger (not debuggee) time: Tue Sep 22 23:59:50.225 2020
2500 symbols added
Debugger (not debuggee) time: Wed Sep 23 00:00:10.133 2020
3000 symbols added
Debugger (not debuggee) time: Wed Sep 23 00:00:32.502 2020
3500 symbols added
Debugger (not debuggee) time: Wed Sep 23 00:00:57.303 2020
4000 symbols added
Debugger (not debuggee) time: Wed Sep 23 00:01:23.955 2020
4500 symbols added
Debugger (not debuggee) time: Wed Sep 23 00:01:52.593 2020
5000 symbols added
Debugger (not debuggee) time: Wed Sep 23 00:02:22.930 2020
5500 symbols added
Debugger (not debuggee) time: Wed Sep 23 00:02:55.546 2020
6000 symbols added
Debugger (not debuggee) time: Wed Sep 23 00:03:30.068 2020
6500 symbols added
Debugger (not debuggee) time: Wed Sep 23 00:04:06.521 2020
7000 symbols added
Debugger (not debuggee) time: Wed Sep 23 00:04:45.134 2020
7500 symbols added
Debugger (not debuggee) time: Wed Sep 23 00:05:25.709 2020
8000 symbols added
Debugger (not debuggee) time: Wed Sep 23 00:06:08.456 2020
8500 symbols added
Debugger (not debuggee) time: Wed Sep 23 00:06:53.301 2020
9000 symbols added
Debugger (not debuggee) time: Wed Sep 23 00:07:40.663 2020
9500 symbols added
Debugger (not debuggee) time: Wed Sep 23 00:08:29.967 2020
10000 symbols added
the result of symbols are as follows
0:021> x xul!str_000100*
50462710 xul!str_00010000 = <no type information>
50462711 xul!str_00010001 = <no type information>
50462712 xul!str_00010002 = <no type information>
50462713 xul!str_00010003 = <no type information>
50462714 xul!str_00010004 = <no type information>
50462715 xul!str_00010005 = <no type information>
50462716 xul!str_00010006 = <no type information>
50462717 xul!str_00010007 = <no type information>
50462718 xul!str_00010008 = <no type information>
50462719 xul!str_00010009 = <no type information>
5046271a xul!str_00010010 = <no type information>
5046271b xul!str_00010011 = <no type information>
5046271c xul!str_00010012 = <no type information>
5046271d xul!str_00010013 = <no type information>
5046271e xul!str_00010014 = <no type information>
5046271f xul!str_00010015 = <no type information>
50462720 xul!str_00010016 = <no type information>
50462721 xul!str_00010017 = <no type information>
50462722 xul!str_00010018 = <no type information>
50462723 xul!str_00010019 = <no type information>
50462724 xul!str_00010020 = <no type information>
50462725 xul!str_00010021 = <no type information>
50462726 xul!str_00010022 = <no type information>
50462727 xul!str_00010023 = <no type information>
50462728 xul!str_00010024 = <no type information>
50462729 xul!str_00010025 = <no type information>
5046272a xul!str_00010026 = <no type information>
5046272b xul!str_00010027 = <no type information>
5046272c xul!str_00010028 = <no type information>
IDebugSymbols3::AddSyntheticSymbol
in the extension mentioned below), I've researched a bit, and run into another extension (synexts
) which allows adding a symbol through the command window: Blog (The blog also mentions that the method is exposed inpykd
as well)