flat assembler
Message board for the users of flat assembler.
Index
> Compiler Internals > debugging information |
Author |
|
NoName_s 16 Jan 2006, 11:12
I want to see in new fasm dwarf, xcoff.
I founded Dwarf in elf for arm platform, but this edition of fasm can't assembly x86 instructions :( Pls. help. |
|||
16 Jan 2006, 11:12 |
|
NoName_s 16 Jan 2006, 11:39
and it may be stabs
|
|||
16 Jan 2006, 11:39 |
|
Tomasz Grysztar 16 Jan 2006, 20:03
I still plan (as I once wrote) to extend the fasm's core so it will be able to generate any verbose debug information - and then I can extend output formats to handle it. But this still needs some work (I started with some other things first).
|
|||
16 Jan 2006, 20:03 |
|
NoName_s 17 Jan 2006, 11:05
Its will great if Tomasz create support x86/arm and dwarf (ver 2 or 3) in fasm.
elf code placed in format.inc, and i must rewrite too many code from ARMv6.INC its very hard(?) for me. See attach. Error becouse new fasm with new macroses or what? http://rapidshare.de/files/11213697/error.PNG.html |
|||
17 Jan 2006, 11:05 |
|
revolution 18 Jan 2006, 02:19
Quote: Error becouse new fasm with new macroses or what? I have not updated the FASMARM code with the 1.65.x code because it is constantly changing as present. download the last stable 1.64 and use that to do your development. |
|||
18 Jan 2006, 02:19 |
|
NoName_s 18 Jan 2006, 10:00
about arm macros i know.
If comment whose two lines we getting program http://rapidshare.de/files/11275959/FASMW.zip.html Rewrite needed, fix some links of code, but src of compiler is biggest and i don't know it structure :(. added: fasm show error if try compile elf and exception if COFF |
|||
18 Jan 2006, 10:00 |
|
rugxulo 19 Jan 2006, 06:07
Newer YASM snapshots now support STABS (according to yasm1338 -g help), but I don't use that feature, so don't ask me anything!
|
|||
19 Jan 2006, 06:07 |
|
Tomasz Grysztar 19 Jan 2006, 08:07
I am likely to implement DWARF first.
Also something for PE would be nice, but there seems to be more than one standard... |
|||
19 Jan 2006, 08:07 |
|
Tomasz Grysztar 22 Jan 2006, 21:59
I've done some modifications in fasm's core to make symbol dumps possible and fasm 1.65.9 is the first public release that has them.
I'm attaching here the test-purposes-only routine "symbol_dump", which you can include in fasm's interface and put a call to it just after the "call assembler" line. It dumps into file called SYMBDUMP.TXT all the symbols (labels and constants) that got defined during the assembly, with their values and information about which line of source defined each of them. Now some examples of what it does. For the simplest one, create test1.asm containing just: Code: a: the SYMBDUMP.TXT will look like this: Code: a: value 0x0000000000000000, absolute, defined in test1.asm[1] As test2.asm let's take this: Code: format ELF section '.text' executable public _start _start: extrn writemsg mov esi,msg call writemsg mov eax,1 xor ebx,ebx int 0x80 section '.data' writeable msg db "Elves are coming!",0xA,0 The SYMBDUMP.TXT is now: Code: _start: value 0x0000000000000000, relative to section .text, defined in test2.asm[6] writemsg: value 0x0000000000000000, relative to external writemsg, defined in test2.asm[8] msg: value 0x0000000000000000, relative to section .data, defined in test2.asm[19] The labels relative to registers: Code: label x at ebp+ecx*8+7 get dumped like this: Code: x: value ebp+ecx*8+0x0000000000000007, absolute, defined in test3.asm[1] ...and the most interesting things can show up, when you feed some macro-rich source into it. Using some simple macro: Code: macro A { x: } A makes the symbol placement in dump look like: Code: x: value 0x0000000000000000, absolute, defined in line generated by (test4.asm[6]) from (test4.asm[3]) The round brackets are put there because the nesting of macro definitions may come into the game, like: Code: macro A { macro B \{ x: \} B } A which make the single line in dump become quite complicated: Code: x: value 0x0000000000000000, absolute, defined in line generated by (line generated by (test5.asm[9]) from (test5.asm[7])) from (line generated by (test5.asm[9]) from (test5.asm[5])) I leave it to the reader to analyze how this dump explains what happened.
|
|||||||||||
22 Jan 2006, 21:59 |
|
Tomasz Grysztar 22 Jan 2006, 22:07
I'm also trying to design some extension to assembler that would generate the listing-like relation of source lines to the generated code, without any additional pass (and with the tree-like origination of each line, like in the symbol dump provided above). The only thing that worries me is whether I will be then able to feed all that information into some existing debug information format. I still don't know enough about all those formats to find out which is best suited to contain the kind of information that fasm is able to provide, and I don't know whether there is any that could accept such specific kind of information records at all.
|
|||
22 Jan 2006, 22:07 |
|
NoName_s 06 Mar 2006, 12:29
XCOFF is extend debug info format for coff/pe and gcc can generate it for coff (is for elf?). Description http://en.wikipedia.org/wiki/XCOFF.
Dwarf is more functionally and it spec N3 created in jan of 2006 http://dwarf.freestandards.org/Home.php GCC can generate it for elf. |
|||
06 Mar 2006, 12:29 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.