flat assembler
Message board for the users of flat assembler.
Index
> Compiler Internals > Bad addressing in ELF64 (it's gdb's fault ;)) |
Author |
|
LocoDelAssembly 09 Jul 2007, 15:58
Does gdb inform explicitly when RIP addressing is used? (example: "lea rax,ds:RIP+0x100134")
Is very possible that it is because of the RIP-relative addressing but try this code to see if you get the same pointer: Code: mov rax, hBuff mov rdx, rax lea rax, [hBuff] xor ebx, ebx cmp rax, rdx sete bl int3 |
|||
09 Jul 2007, 15:58 |
|
scientica 09 Jul 2007, 16:23
Dunno, I don't really like gdb, I only use it because ollydbg isn't for linux
Code: (gdb)x /7ib $rip 0x4001d1 <_start+1>: mov rax,0x5002d8 0x4001db <_start+11>: mov rdx,rax 0x4001de <_start+14>: lea rax,ds:0x1000f3 0x4001e5 <_start+21>: xor ebx,ebx 0x4001e7 <_start+23>: cmp rax,rdx 0x4001ea <_start+26>: sete bl 0x4001ed <_start+29>: int3 ---8< --- 2: $rdx = 5243608 1: $rax = 5243608 so that means that gdb isn't showing RIP-relative explicity? |
|||
09 Jul 2007, 16:23 |
|
LocoDelAssembly 09 Jul 2007, 17:17
Exactly (0x4001e5 + 0x1000f3 = 0x5002d8)
|
|||
09 Jul 2007, 17:17 |
|
vid 09 Jul 2007, 17:23
scientica: download FDBG
|
|||
09 Jul 2007, 17:23 |
|
scientica 09 Jul 2007, 20:08
/me beats up gdb
vid, thanks, had forgottten about fdbg (I've been away from asm for way too long it seems ) |
|||
09 Jul 2007, 20:08 |
|
vid 09 Jul 2007, 20:34
scientica: what sort of job you have?
|
|||
09 Jul 2007, 20:34 |
|
scientica 10 Jul 2007, 14:34
I'm currently "summer working" (cleaning, quite nice with some physical work for a change; also, cash is always good when studying ), but my 'real' occupation currently is studying (CS (sic!) at LiU). It takes quite some time, and when I get free time I tend to be rather tired (or out with my friends) - sadly I haven't had much time for coding assembly (been doing functionall stuff(=lisp) and imperative (=Ada(95)) for most of the past year). My second year will start in August (the year before this one I studied japanese).
I'm trying to make sure I'll pass the 2 maths courses I failed this semester (discrete and calculus), so I should spend most of my free time studying now. _________________ ... a professor saying: "use this proprietary software to learn computer science" is the same as English professor handing you a copy of Shakespeare and saying: "use this book to learn Shakespeare without opening the book itself. - Bradley Kuhn |
|||
10 Jul 2007, 14:34 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.