flat assembler
Message board for the users of flat assembler.

Index > Unix > Debugger

Author
Thread Post new topic Reply to topic
killasmurf86



Joined: 29 Sep 2010
Posts: 36
killasmurf86 29 Sep 2010, 19:03
Ye, it's probably asked many times, but forum search didn't return any useful info (at least any new info)

The question is:
Are there any usable assembler debugger under unix?

I don't care for symbolic info support etc....

Currently I'm using ald, which is old, unmaintained and unfinished (and I hate that it decodes 0x90 wrong)

GDB <-- it sux, it sux, it sux, it sux..... ald is much better for debugging asm.

edb ( http://www.codef00.com/projects.php#debugger ) - doesn't work on FreeBSD yet
[I wrote FreeBSD, port, but it's broken yet http://aldis.git.bsdroot.lv/devel/edb/tree/]

RROD ( http://rr0d.droids-corp.org/ ) looks unmaintained for at least 3 years

So are there any other debugger I don't know?
---------
Currently I use ald, but there is one very strange behaviour in my code, when I repnz movsb ecx is decreasing normally, and then suddenly it skips some 10 iterations ..... (hard to explain, sorry)
I want to test this with other debugger


Last edited by killasmurf86 on 30 Sep 2010, 06:33; edited 1 time in total
Post 29 Sep 2010, 19:03
View user's profile Send private message Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4624
Location: Argentina
LocoDelAssembly 29 Sep 2010, 20:08
http://board.flatassembler.net/topic.php?t=9689

But you won't be able to use it in FreeBSD without porting and also it is 64-bit only (not sure if it is able to debug 32-bit code, but still requires a 64-bit OS).
Post 29 Sep 2010, 20:08
View user's profile Send private message Reply with quote
killasmurf86



Joined: 29 Sep 2010
Posts: 36
killasmurf86 29 Sep 2010, 20:24
thanks for info.....
porting to FreeBSD shouldn't be too hard

but I need 32bit debugger..... Sad
I use old Pentium4

But at least now I know one more debugger


Last edited by killasmurf86 on 06 Oct 2010, 13:30; edited 1 time in total
Post 29 Sep 2010, 20:24
View user's profile Send private message Reply with quote
Endre



Joined: 29 Dec 2003
Posts: 215
Location: Budapest, Hungary
Endre 05 Oct 2010, 08:53
Maybe it sounds blasphemy here, but gdb + gas + gcc + cpp + ld do not suck at all. Even if you program unix-like systems (bsd, linux), then this is the way you might want to choose. GNU assembler provides you fine debug information which gdb understands without any problems (so, debugging doesn't suck any more even if you're using some GUI). You can even include system header files as you would do in C (when assembling with gcc it calls to the C-preprocessor automatically). Regarding the dark side however, gas doesn't give you so convenient macro facilities. To avoid this, some professional users apply m4 language to extend those macro possibilities of gas, but I've never needed it yet. I already posted some gcc sources on this board so you can search for them to get an impression about it. Additionally binutils contains lots of useful tools (readelf, objdump, etc.) as well as the GNU tool-chain is regularly updated and the most commercial tool-chains for embedded systems (where assembly is perhaps seriously needed) support gcc/gas syntax.
Post 05 Oct 2010, 08:53
View user's profile Send private message Reply with quote
killasmurf86



Joined: 29 Sep 2010
Posts: 36
killasmurf86 05 Oct 2010, 10:28
Thanks for info...
I haven't tried gas+gdb

Right now I work with fasm and ald. I already got used to ald.
Currently I've seen only 3 bugs:
1) 0x90 is disassembled as xchg eax, eax
2) when doing rep something in single step mode it skips some cycles (watch ecx)
3) after your program exit, it's easier to restart ald, than program in ald Very Happy

The bonus is, that I don't need symbolic info Very Happy (well almost don't need it. It's good to have symbolic info for _start Very Happy )


Does gas SSSO (same source, same output)?
Post 05 Oct 2010, 10:28
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20301
Location: In your JS exploiting you and your system
revolution 05 Oct 2010, 10:33
killasmurf86 wrote:
Does gas SSSO (same source, same output)?
Nope, it has many many command line options.
Post 05 Oct 2010, 10:33
View user's profile Send private message Visit poster's website Reply with quote
killasmurf86



Joined: 29 Sep 2010
Posts: 36
killasmurf86 05 Oct 2010, 10:46
Post 05 Oct 2010, 10:46
View user's profile Send private message Reply with quote
ManOfSteel



Joined: 02 Feb 2005
Posts: 1154
ManOfSteel 05 Oct 2010, 11:21
Indeed it is... for people used to the Intel syntax, that is Smile

What is your problem with GDB?
Post 05 Oct 2010, 11:21
View user's profile Send private message Reply with quote
killasmurf86



Joined: 29 Sep 2010
Posts: 36
killasmurf86 05 Oct 2010, 13:03
It is useless without debugging symbols.
It is useless even with debugings symbols (when I compile with nasm)

It skips breakpoints..... that alone drives me nuts

I which I could use Ollydbg, or immunity debugger Very Happy
Post 05 Oct 2010, 13:03
View user's profile Send private message Reply with quote
ManOfSteel



Joined: 02 Feb 2005
Posts: 1154
ManOfSteel 05 Oct 2010, 13:17
killasmurf86 wrote:
debugging symbols

Just to be clear, you are talking about variables names, for instance?
Post 05 Oct 2010, 13:17
View user's profile Send private message Reply with quote
killasmurf86



Joined: 29 Sep 2010
Posts: 36
killasmurf86 05 Oct 2010, 13:41
Sorry, I said debugging symbols, when I had to say debug information
Post 05 Oct 2010, 13:41
View user's profile Send private message Reply with quote
killasmurf86



Joined: 29 Sep 2010
Posts: 36
killasmurf86 05 Oct 2010, 21:24
killasmurf86 wrote:
Currently I've seen only 3 bugs:
1) 0x90 is disassembled as xchg eax, eax


hmm, that is actually not a bug.... This was documented in Intel's optimization manual
Post 05 Oct 2010, 21:24
View user's profile Send private message Reply with quote
Endre



Joined: 29 Dec 2003
Posts: 215
Location: Budapest, Hungary
Endre 06 Oct 2010, 08:17
Post 06 Oct 2010, 08:17
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.