flat assembler
Message board for the users of flat assembler.
Index
> Main > Debugging assembly |
Author |
|
Erikina 06 Apr 2006, 10:14
I've been playing around with assembly for the last month, and now today is the first day in my two week school break - and I thought I would really like to learn assembly.
I have bought the book Assembly Language for Intel-Based Computers which I so far really like. It uses MASM, so for practice I am trying to convert the examples to FASM (without much success). Anyway, to my actual point ... I'm wonder what's the best way to debug assembly. With C# I could set breakpoints in my code, and the program would freeze there ... and I could mouse-over variables and see what was stored in them etc. It was really nice. Is there an equivilent for assembly? I've downloaded OllyDbg but frankly that program scares me. Thanks a lot guys. |
|||
06 Apr 2006, 10:14 |
|
RedGhost 06 Apr 2006, 14:25
Erikina wrote:
if it can be done in C#, it has to be able to be done in ASM considering c# creates the opcodes which assembly is int3 is a breakpoint Code:
mov eax, bla
int3
...
olydbg is a very good programme i recommend it, i've been too lazy to ever set custom colours but maybe i should _________________ redghost.ca |
|||
06 Apr 2006, 14:25 |
|
vid 06 Apr 2006, 14:41
C# doesn't generate machine language. It generates so-called MSIL, which is some MS's syntax that is compiled at run-time by .net framerwork
to debug assembly (or anything), you need debugger, and things you mentioned are features of debuggers. It is not question of language (asm, C#), but of envirnment you use (notepad, visual studio). For win32, best debugger i know is OllyDbg, but fasm still lacks symbolic information, so you won't see names. I think Fresh has some debugger, but i don't know if it is already working. |
|||
06 Apr 2006, 14:41 |
|
Erikina 06 Apr 2006, 20:35
Madis731 wrote: Why? I've made it so that I can see exactly what I typed in FASM in it. It has very flexible design. You can colour everything (almost) you like in there and not only can you see variables at that time - you also "see" all the registers and memory at that moment. You can even trace it and "go back in time" Vid wrote: C# doesn't generate machine language. It generates so-called MSIL, which is some MS's syntax that is compiled at run-time by .net framerwork Smile Thanks a lot guys. |
|||
06 Apr 2006, 20:35 |
|
madmatt 06 Apr 2006, 20:49
You can also use Dr. Watson (32-bit version). it produces a disassembly of where the fault occured and xx lines before and after the fault location. You can find it in your system32 folder. Just create a shortcut to your desktop, double click, do some setup (the most inportant would be which folder to put the output in, "my documents" would be a good place.)
Also, you may be able to use the Dr. Watson output with your c# setup. |
|||
06 Apr 2006, 20:49 |
|
vid 07 Apr 2006, 00:12
i think there actually isn't any solution to debug FASM source at source level. Soon there will probably be some debugging information, but right now problem is that there is no widespread existing debug-info-format which could contain all information FASM produces. Seems Tomsz will have to develop his own format, from which other utilities will export to known formats.
|
|||
07 Apr 2006, 00:12 |
|
Big Red 07 Apr 2006, 01:33
OllyDbg is a great debugger, seriously. Learn to use it now and you'll save yourself a lot of time later, even if you don't get FASM symbols. There's nothing quite as flexible.
|
|||
07 Apr 2006, 01:33 |
|
bogdanontanu 07 Apr 2006, 06:41
IF you are using MASM or TASM you can add flags to the command line to include debug info inside the executable. For debugging this is much better than PDB... because it is always there available without additional files.
Then, in OllyDbg or in MS VC Debugger or in other symbolic debuggers you can debug at souce level and you will also see the source and the variables names, procedures names, arguments local avriables call stac etc... no hovering over a variable yet in Olly but you can add "watches" In some ASM IDEs you can even setup breakpoints at source level but otherwise inserting a breakpint is like adding a line with: "int 3" Of course inside Olly you can use and see the real hardware registers used for breakpoints...==> a powerfull feature of the CPU |
|||
07 Apr 2006, 06:41 |
|
Madis731 07 Apr 2006, 06:56
@Erikina: I didn't make the debugger, I just said that I configured it to my needs and comfort
Actually the guy who did it is called Oleh Yuschuk, that is maybe why it is called OllyDbg http://www.ollydbg.de/ |
|||
07 Apr 2006, 06:56 |
|
farrier 07 Apr 2006, 08:44
Madis731 wrote: Why? I've made it so that I can see exactly what I typed in FASM in it. It has very flexible design. You can colour everything (almost) you like in there and not only can you see variables at that time - you also "see" all the registers and memory at that moment. You can even trace it and "go back in time" Madis731, Can you share with us what you have done to view your FASM source from within OllyDbg? That would definetly make my nipples hard thanks, farrier _________________ Some Assembly Required It's a good day to code! U.S.Constitution; Bill of Rights; Amendment 1: ... the right of the people peaceably to assemble, ... The code is dark, and full of errors! |
|||
07 Apr 2006, 08:44 |
|
tom tobias 07 Apr 2006, 08:56
Quote:
I would enter a special plug for a book which I have long admired, Dandamudi's textbook: http://www.powells.com/cgi-bin/biblio?inkey=4-0387206361-0 Madis: Thanks for explaining the origins of ollydebug. I had always thought of Laurel and Hardy http://www.imdb.com/title/tt0029747/ because of Stan Laurel's plaintive and whining cry for "ollie", Oliver Hardy, to assist him in figuring out what to do next. |
|||
07 Apr 2006, 08:56 |
|
bogdanontanu 07 Apr 2006, 16:04
BUT wait... I guess you can hover over a variable in IDA Pro
You can even hover over a Jump or Call ad it will show you some code from the destination. |
|||
07 Apr 2006, 16:04 |
|
Madis731 08 Apr 2006, 09:55
There are:
Options => Debugging options (Alt+O) Disasm tab 1) IDEAL (Borland) 2) Don't show default segments (only when forced segment) 3) Don't always show the size of memory operands (only when prefixed) Maybe this will help:
|
|||||||||||
08 Apr 2006, 09:55 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.