0

Is is there a C# build construct available that would allow me to create a link map containing symbols and offsets? I need to debug an application that is throwing an exception when running scheduled out of Task Scheduler.

Here are some details of what is going on: I have developed a C# application on Windows 10 Workstation (non-server). I am trying to run this application on Windows Server 2012 R2, which, like the Windows 10 system, has .net framework 4.5.1 installed.

The application runs with no known errors on the development workstation, whether it is run installed or out of Visual Studio 2012.

However, the application will not run at its scheduled time out of Windows Task Scheduler. This is the error 0xE0434352 -- I have been reading SuperUser and stackOverflow posts about this error -- and the Windows application event log shows an exception has occurred.

However, the offsets in the application event log are not a lot of help without having a map of the executable.

Is creating a link map or equivalent possible?

Here is a link to one description of a linker map for gcc.

Ian Kemp
  • 28,293
  • 19
  • 112
  • 138
octopusgrabbus
  • 10,555
  • 15
  • 68
  • 131
  • It might be useful to explain what link map is, or link to the project-page. – JonasH Jun 03 '20 at 19:49
  • There is no project page for this application. You get a link map, or at least you used to, when compiling C or C++. It shows the symbols in the application, the application's starting address (virtual) after the loader loads it, and the offsets from that virtual starting address. OP now has a link to a linker map description. – octopusgrabbus Jun 03 '20 at 19:55
  • 4
    No possibility to add some logging that would give you more information? – Lasse V. Karlsen Jun 03 '20 at 20:03
  • `However, the offsets in the application event log are not a lot of help without having a map of the executable.` What "offsets"? C# doesn't deal with raw memory addresses, so I'm not even sure what you think you're seeing. Post one of the event log entries. – Ian Kemp Jun 03 '20 at 20:04
  • C/C++ don't deal with raw memory either. They deal with a virtual starting point and offsets. The offsets can help you track down code to the line usually. – octopusgrabbus Jun 03 '20 at 20:16

1 Answers1

1

in .Net the assemblies are self-describing. A debug database file is useful, but not necessary to describe the objects and how the code is structured. So I would not think a link map are relevant for .net assemblies.

You might want to take a look at dnSpy, this is a combined de-compiler, debugger and assembly editor. It is often useful when trying to debug errors. It is however limited to managed code, so it will probably be less useful if the error is in native code.

JonasH
  • 28,608
  • 2
  • 10
  • 23