Recent Posts

Pages: 1 ... 6 7 [8] 9 10
71
Programming with NASM / Re: gdb and debug symbols
« Last post by decuser on March 02, 2024, 02:47:47 PM »
and I've tried it with no -F, -F stabs, and -Fdwarf, same result.
72
Programming with NASM / Re: gdb and debug symbols
« Last post by decuser on March 02, 2024, 02:46:18 PM »
Ok. I've since learned a lot more about what I'm doing with this stuff (assembly on Linux). I still have the same issue though.

I've tried adding nop as the first executable instruction:

Code: [Select]
section .data
EOLs: db 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10

section .text

global _start
_start:
    nop

When I fire up gdb, I'm able to debug fine. I can set breakpoints at my labels, step through code, display memory contents with x/, etc. But, if I try to use:

Code: [Select]
info address EOLs
I get

Code: [Select]
Symbol "EOLs" is at 0x402000 in a file compiled without debugging.
Sure enough EOLs is at 0x402000:

Code: [Select]
(gdb) x/16bx &EOLs
0x402000 <EOLs>:        0x0a    0x0a    0x0a    0x0a    0x0a    0x0a    0x0a    0x0a
0x402008:       0x0a    0x0a    0x0a    0x0a    0x0a    0x0a    0x0a    0x0a
(gdb) x/16bx 0x402000
0x402000 <EOLs>:        0x0a    0x0a    0x0a    0x0a    0x0a    0x0a    0x0a    0x0a
0x402008:       0x0a    0x0a    0x0a    0x0a    0x0a    0x0a    0x0a    0x0a

Why does it report that it's in a file compiled without debugging?
73
Programming with NASM / Re: Learning Assembler
« Last post by AntonPotapov on February 29, 2024, 05:56:30 PM »
I think I've found what I need. this link was on wikipedia ( https://en.wikipedia.org/wiki/Assembly_language )

Jorgensen, Ed. "x86-64 Assembly Language Programming with Ubuntu" (PDF)
http://www.egr.unlv.edu/~ed/assembly64.pdf
74
Programming with NASM / Learning Assembler
« Last post by AntonPotapov on February 28, 2024, 03:37:16 PM »
Are there any good sites for comprehensive instruction in assembly language? In documents NASM There is only information on how to use the compiler and preprocessor (chips for convenience). I'm looking for something like: https://www.learncpp.com/. Assembly language only.

Off-topic. I started learning assembler, but then gave up. Now I'm back at it again
75
Example Code / Assembly x86_64 Linux Web API
« Last post by Rodrigo Robles on February 14, 2024, 04:14:51 AM »
I wrote a POC of a x86_64 Assembly Web API to test its viability, got carried away and ended up with five Assembly Web APIs testing different possible architectures.

This is probably the fastest Web API of the world.

I wrote a paper draft about this experiment: https://drive.google.com/uc?id=18fSnr4ZVtPJbnq9v8xogodC_jklb75xf&export=download

In the paper I explain in detail the architectures I tested:
1. asmapi-monoproc (single process): https://gitlab.com/RodrigoRobles/asmapi-monoproc
2. asmapi (multi process): https://gitlab.com/RodrigoRobles/asmapi
3. asmapi-threadpool: https://gitlab.com/RodrigoRobles/asmapi-threadpool
4. asmapi-threadpool-futex: https://gitlab.com/RodrigoRobles/asmapi-threadpool-futex
5. asmapi-lateaccept (thread pool w/ preforking): https://gitlab.com/RodrigoRobles/asmapi-lateaccept

The five APIs use a 0 dependency architecture, not depending on any external library, neither libc, only talking directly with the kernel.
76
Programming with NASM / Re: gdb and debug symbols
« Last post by Frank Kotler on February 04, 2024, 12:13:20 AM »
It may help to tell Nasm  "-F dwar"
Start your cide wuth a singke byte opcode  I like
"nop

st,
BeFrank

77
Other Discussion / Re: NASM or YASM in the modern era (or something else)
« Last post by Frank Kotler on February 03, 2024, 11:53:38 PM »
From what little I know of Yasm, it offers the option of AT$T syntax. if that's an advantagea.
Fasm is another nice assembler. Their forum might be more acive.
I don' thonk any of them will leave yo in the dark ages.

Best,
Franl

t
78
Other Discussion / Re: NASM or YASM in the modern era (or something else)
« Last post by debs3759 on February 03, 2024, 10:43:57 PM »
As far as I know, this is it. There are mailing lists, but they are dead.
79
Programming with NASM / gdb and debug symbols
« Last post by decuser on February 03, 2024, 10:25:11 PM »
nasm newb here...

I have started using nasm and I am trying to debug my program. I did nasm -g and ld -g and when I open gdb, or ddd, it shows my listing and will let me step through the code and whatnot, yay! However, when I try to display a variable's address using 'info address bVar1' it says:
Symbol "bVar1" is at 0x402000 in a file compiled without debugging.

What it means, as I understand it, is that the file was not compiled with gnu debugging symbols. Obviously, there are debugging symbols present, but they're in whatever the default format is for nasm. Should I be worried, or just ignore it?

FWIW, stuff like:

(gdb) x/db &bVar1

seems to work:

0x402000 <bVar1>:       17


Thx!
80
Other Discussion / Re: NASM or YASM in the modern era (or something else)
« Last post by decuser on February 03, 2024, 09:53:13 PM »
Cool. So, is there another chattier hangout for nasm users?
Pages: 1 ... 6 7 [8] 9 10