4

I am trying to load a symbol file at a specific offset in memory in CDB. Something just like the command for GDB:

gdb add-symbol-file address

Is there any way to do this? I have tried making a WinDBG plugin, but can not find any helpful functions.

Thomas Weller
  • 55,411
  • 20
  • 125
  • 222
N. Ionita
  • 41
  • 3
  • I'm not sure what this should mean. I always thought that the symbols are loaded into the address space of WinDbg. Why would you want to control the memory layout of the WinDbg process? To me, this looks like a XY issue. What are you really trying to achieve with those symbols? – Thomas Weller Sep 09 '16 at 12:35
  • i forgot to mention that i am working on dump files. I do not debug an application, i need to extract as much information as I can from a dump. – N. Ionita Sep 09 '16 at 12:44
  • Then why not simply load the symbols with `ld *`? What's the benefit of loading them to a specific address? – Thomas Weller Sep 09 '16 at 12:48
  • I am trying to debug a dump file for a custom binary. on linux there is a command for loading symbols at a custom address: gdb add-symbol-file address. Is there any equivalent in WinDBG? – N. Ionita Sep 09 '16 at 12:54
  • Why are you looking for a command that you don't need. Try `ld *` – Thomas Weller Sep 09 '16 at 13:24

2 Answers2

0

Take a look at AddSyntheticSymbol and AddSyntheticModule Search woodmann or google addsym windbg extension for an example to use AddSyntheticSymbol i am on 4 inch cant type more

blabb
  • 8,674
  • 1
  • 18
  • 27
  • I have looked into what you have said. But it does not help me very much. My situation is like this: i have a module that has some custom binary code sections in it. I have the pdb for each custom binary. I can not use the AddSyntheticModule because this function wants a module, not a piece of code. – N. Ionita Sep 13 '16 at 06:51
  • i am not sure i understand your custom situation you commented earlier that you were working on dump files now you are saying you have a binary will you be able to expand what you are talking about if you are talkin about a binary do you specifically mean any executable format in windows like exe , dll , sys etc were they compiled with any windows based compiler that emits a pdb as far as i know all the compilers generate one single pdb for the whole module not n number of pdbs for each code section – blabb Sep 13 '16 at 22:40
0

This question makes a lot of sense. For instance, when a WindProc call is attempted against an unloaded module. To accomplish this, use the .reload command.

.reload docs

Steve Johnson
  • 2,958
  • 13
  • 15
  • The .reload command, as I know, matches each module with one symbol file. The problem, in my case, is that i want to specify more symbol files for one module (in that module I have custom binary code sections in it). This is why I needed something like the gdb command shown. – N. Ionita Sep 13 '16 at 06:55