Problem with getting file and line from ImageHlp.dll
-
This is on NT 4.0, SP6 using dev studio 6.0, sp4 I've just upgraded to these to try to fix the problem I'm about to describe. The code I'm describing used to work, then one day I noticed it no longer worked, and I hadn't touched the code! I think a service pack or something broke the code. I've seen this once before and the only fix that worked was to reinstall the OS and all the tools. I don't want to do that :-). The code is some code that given an address uses the SymGetLineFromAddr() function in imagehlp.dll to get the line number. I'm using the fix that John Robbins provided that accounts for the address not matching a line's exact address. This used to work, but now I get no file or line number information. Anyone come across this and worked out how to fix it? Cheers Stephen (2 questions in 1 day...)
-
This is on NT 4.0, SP6 using dev studio 6.0, sp4 I've just upgraded to these to try to fix the problem I'm about to describe. The code I'm describing used to work, then one day I noticed it no longer worked, and I hadn't touched the code! I think a service pack or something broke the code. I've seen this once before and the only fix that worked was to reinstall the OS and all the tools. I don't want to do that :-). The code is some code that given an address uses the SymGetLineFromAddr() function in imagehlp.dll to get the line number. I'm using the fix that John Robbins provided that accounts for the address not matching a line's exact address. This used to work, but now I get no file or line number information. Anyone come across this and worked out how to fix it? Cheers Stephen (2 questions in 1 day...)
The problem is probably that the ImageHlp.dll was replaced by a service pack. So the SymGetLineFromAddr() function is no longer present in your current NT4 version. (It's only available in the W2K aka NT5 version) Since ImageHlp.dll is a redistributable you can replace it again with the most recent (W2K) version you can find. Make sure your debug symbol files are A-OK. If that does not help, re-read some of John Robbins' articles... GBO.
-
The problem is probably that the ImageHlp.dll was replaced by a service pack. So the SymGetLineFromAddr() function is no longer present in your current NT4 version. (It's only available in the W2K aka NT5 version) Since ImageHlp.dll is a redistributable you can replace it again with the most recent (W2K) version you can find. Make sure your debug symbol files are A-OK. If that does not help, re-read some of John Robbins' articles... GBO.
Thanks, But that isn't the problem. The functions are present and I am calling them, they just fail to return any valid info, even thought the pdb files are valid. I reinstalled the OS - which nicely trashed my partition table even though it shouldn't have, good job I had backups. Stephen
-
Thanks, But that isn't the problem. The functions are present and I am calling them, they just fail to return any valid info, even thought the pdb files are valid. I reinstalled the OS - which nicely trashed my partition table even though it shouldn't have, good job I had backups. Stephen
Sorry my comments didn't help. Can you use windbg on your system to read the Drwtsn32 "core" Dump files? This might give you a clue. (you got to make DrWtsn32 your default debugger and let it generate core files but I am sure you already read how to do this in John Robbin's articles...) You might want to change the debug info generation to "C7" compatible which is sufficient to read the line numbers and a get a function name context. Then again if you reinstalled the OS, everything might be running OK now. Good luck.