flat assembler
Message board for the users of flat assembler.

Index > Projects and Ideas > FDBG - win64 Linux64 UEFI x64 AMD64 debugger

Goto page Previous  1, 2, 3 ... 10, 11, 12
Author
Thread Post new topic Reply to topic
I



Joined: 19 May 2022
Posts: 58
I 05 Mar 2023, 08:06
@FlierMate11 Try http://fdbg.x86asm.net/
Post 05 Mar 2023, 08:06
View user's profile Send private message Reply with quote
FlierMate11



Joined: 13 Oct 2022
Posts: 94
FlierMate11 05 Mar 2023, 08:11
I wrote:
@FlierMate11 Try http://fdbg.x86asm.net/


Cool, FDBG is hosted there, the same website I use for disassembler reference (http://ref.x86asm.net/) days ago.

Thank you.
Post 05 Mar 2023, 08:11
View user's profile Send private message Visit poster's website Reply with quote
sylware



Joined: 23 Oct 2020
Posts: 462
Location: Marseille/France
sylware 05 Mar 2023, 17:35
BTW, I have to say this is great work (elf/linux on AMD64).

I wish I could set a breakpoint using a defined symbol from the dynamic segment/.dynamic section.
Post 05 Mar 2023, 17:35
View user's profile Send private message Reply with quote
Feryno



Joined: 23 Mar 2005
Posts: 514
Location: Czech republic, Slovak republic
Feryno 05 Mar 2023, 19:31
FlierMate11 - I don't plane to put it on GitHub.
sylware - I implemented only very simple symbols, there are samples_debug_symbols
The beauty of FASM is that it was possible to port debugger to win x64, linux x64, uefi x64
MazeGen was very helpful in hosting fdbg on his site.
Post 05 Mar 2023, 19:31
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
sylware



Joined: 23 Oct 2020
Posts: 462
Location: Marseille/France
sylware 06 Mar 2023, 10:23
Yeah, I saw you were using the ELF classic symbol section. No worrie here since I think we can instruct the linker to create such section with the symbols you would like to debug.

If you want to debug a binary though, the "exported symbols" are in the dynamic symbol table, which is different from the classic symbol table.

No worries, it is just to make you aware of it.

Great work though !
Post 06 Mar 2023, 10:23
View user's profile Send private message Reply with quote
I



Joined: 19 May 2022
Posts: 58
I 11 Mar 2023, 04:54
Yep, good stuff and not just for debugging. I found the source code really helpful when I was trying to implement exception handling under UEFI. For some reason that I don't understand on my x64 system UEFI uses EBC ISA for debugging and not x64. Instead following Feryno's IDT route works a treat. Thanks for the insight @Feryno.
Post 11 Mar 2023, 04:54
View user's profile Send private message Reply with quote
Feryno



Joined: 23 Mar 2005
Posts: 514
Location: Czech republic, Slovak republic
Feryno 11 Mar 2023, 08:38
Yes that was the biggest challenge in UEFI, how to create something which is called "debug loop" in ms win (WaitForDebugEvent / ContinueDebugEvent) and ptrace system call in Linux. Finally I got the "bare hands" idea:
replace all UEFI exception handlers with own (using IDT)
run executable
on any exception restore original UEFI exception handlers
Post 11 Mar 2023, 08:38
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
sylware



Joined: 23 Oct 2020
Posts: 462
Location: Marseille/France
sylware 11 Mar 2023, 13:08
Carefull of the memory page attributes, because it seems UEFI is planning to enable the usage of write and exe attributes on some pages.

Then before replacing anything in UEFI code, you should be sure to have write access to that part of UEFI code/data and your debugger code pages have not the nexe bit on.
Post 11 Mar 2023, 13:08
View user's profile Send private message Reply with quote
Feryno



Joined: 23 Mar 2005
Posts: 514
Location: Czech republic, Slovak republic
Feryno 16 Jan 2024, 15:20
I added a "p" command into fdbg for uefi. It writes a byte into i/o port 80h. These data are transmitted via ASUS COM_DEBUG port and very likely ASROCK UART1 port. You need a cheap USB to TTL device and a second computer to grab the data using putty utility. Using this command you can test easily whether your setup works. Useful when you cannot touch serial port either graphics output or if your project causes serious crash when nor serial port either graphics is responding.
For more about the hardware setup:
https://forum.osdev.org/viewtopic.php?f=1&t=56069
https://youtu.be/Gnm_tuARqVI


Description: fdbg uefi version 0006
Download
Filename: fdbg.uefi.0006.public.zip
Filesize: 143.67 KB
Downloaded: 220 Time(s)

Post 16 Jan 2024, 15:20
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2, 3 ... 10, 11, 12

< 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-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.