Problem with KDbg debugger and build

I just started using KDbg, and it's hard for me to find the answer to my question. I open the file in KDbg (I opened the executable file written on the assembly), a pop-up message appears that says

GDB: reading characters from / home / myputer / Desktop / ASMdirectory / chapter 5 / eatsyscall / eatsyscall ... done.

How do I get the ability to run the program in the debugger and add breakpoints, etc. This does not allow me to click a button to start the program or add breakpoints, is there a problem? Did I miss a step? Thank you in advance. BTW I use Linux (Ubuntu) and NASM for my assembler.

+4
source share
1 answer

What software versions are you using?

For example, I am running Ubuntu 12.04, kdbg 2.5.0 (KDE 4.8.5 development platform), gdb 7.4-2012.04, nasm 2.09.10

You use Dantmann’s book, yes? I assume that you changed SECTION .txt to SECTION .text because when GDB tries to read characters, it says "done" instead of "Could not find code sections in character file"

I would recommend using gdb directly instead of kdbg. I don't know how to get kdbg to show a disassembled code or list (or how to send any gdb commands directly). I think the best that can be done is:

  • Run kdbg
  • Open executable file
  • Go to the Breakpoints tab
  • Type "_start" (which I believe is the only visible character you have) in the edit box.
  • Click the Add Breakpoint button
  • Click the Run button
  • Execution should be broken on _start
  • Click on the "Registers" tab.
  • Click the "Step by Step" button to view the code.

Kdbg doesn't seem to be able to restart execution. It seems the program should be killed and then run again.

0
source

Source: https://habr.com/ru/post/1488177/


All Articles