By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,171 Members | 1,004 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,171 IT Pros & Developers. It's quick & easy.

Assembly problem

P: n/a
Hello,
I have a huge application thats written in C and C++. The application
crashes and I am trying to find a pattern to these crashes. I recently
got my hands on the DrWatson log and the user.dmp file. On running this
dump using Visual studio, I got a lot of Assembly code that I can't
make head or tail of. I was wondering if I can compile the entire
application on my local box and generate the assembly code so that I
can then pinpoint the section of the assembly code that causes the
unhandled exception and trace it back to my C/C++ code. So my questions
are:
1. Is there a better way to know what function in C C++ code is causing
the Unhandled exception when you ONLY have access to assembly code
without any symbols?
2. Is there a setting in some compiler (visual studio for e.g.) that
generates Assembly code instead of object code?
Thanks in advance for your time.

Best regards,
B.

Jun 21 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On 20 Jun 2006 22:47:51 -0700, bi**********@yahoo.com wrote:
Hello,
I have a huge application thats written in C and C++. The application
crashes and I am trying to find a pattern to these crashes. I recently
got my hands on the DrWatson log and the user.dmp file. On running this
dump using Visual studio, I got a lot of Assembly code that I can't
make head or tail of. I was wondering if I can compile the entire
application on my local box and generate the assembly code so that I
can then pinpoint the section of the assembly code that causes the
unhandled exception and trace it back to my C/C++ code. So my questions
are:
This newsgroup, comp.lang.c, is about discussing standard C
language-related issues.

Unfortunately, the C standard doesn't mention anything about DrWatson
or user.dmp or Visual Studio or even assembly code, so technically
your post is off-topic and consequently we can't really, technically,
help you.
1. Is there a better way to know what function in C C++ code is causing
the Unhandled exception when you ONLY have access to assembly code
without any symbols?
Maybe, but some would equate this to making a cow out of hamburger. Be
forewarned.
2. Is there a setting in some compiler (visual studio for e.g.) that
generates Assembly code instead of object code?
Thanks in advance for your time.


If there is, you're best off asking this question in a newsgroup that
is more specific to your compiler. Search http://groups.google.com.

--
jay

Jun 21 '06 #2

P: n/a
On 2006-06-21, bi**********@yahoo.com <bi**********@yahoo.com> wrote:
Hello,
I have a huge application thats written in C and C++. The application
crashes and I am trying to find a pattern to these crashes. I recently
got my hands on the DrWatson log and the user.dmp file. On running this
dump using Visual studio, I got a lot of Assembly code that I can't
make head or tail of. I was wondering if I can compile the entire
application on my local box and generate the assembly code so that I
can then pinpoint the section of the assembly code that causes the
unhandled exception and trace it back to my C/C++ code. So my questions
are:
1. Is there a better way to know what function in C C++ code is causing
the Unhandled exception when you ONLY have access to assembly code
without any symbols?
You can usually tell the linker to emit a "map file" as well the
executable, which can help you find your way back from a code address to
the C function the code came from.

Check your tool's docs for map file-- hopefully it will also explain how
they work on your system.
2. Is there a setting in some compiler (visual studio for e.g.) that
generates Assembly code instead of object code?


Most compilers can do this, I don't know how you do it in Visual Studio.
The alternative is to disassemble the object code with a disassembler,
which usually works just as well (assembly -> object code is a pretty
much reversible transformation, unlike cow -> hamburger).
Jun 21 '06 #3

P: n/a
On 21 Jun 2006 10:52:40 GMT, Ben C <sp******@spam.eggswrote:
On 2006-06-21, bi**********@yahoo.com <bi**********@yahoo.comwrote:
2. Is there a setting in some compiler (visual studio for e.g.) that
generates Assembly code instead of object code?

Most compilers can do this, I don't know how you do it in Visual Studio.
M$VC has options to generate assy listing _in addition to_ object, and
for linker to generate a map. And the IDE debugger can display
disassembly (by default for code with no symbol info) but see below.
The alternative is to disassemble the object code with a disassembler,
which usually works just as well (assembly -object code is a pretty
much reversible transformation, unlike cow -hamburger).
Not fully. Disassembly can't give you any macros, assy-time
computations, comments, formatting, or ordering of pieces of segments;
and depending on what symbols are kept in your object or executable
maybe not names (symbols) for values or even for locations.

What is true is that disassembly usually gives you code that can be
read with modest effort and even maintained (modified) if needed,
while decompilation doesn't.

To stretch the analogy: A bunch of hamburger pressed back together
isn't really a steak, and it would be fraud to price it as such, but
you can cook it and eat it and get (essentially) the same nutrition.
Whereas you have no hope of getting it to amble and moo.

- David.Thompson1 at worldnet.att.net
Jul 10 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.