Skip to main content
1 vote
1 answer
70 views

Similar question: Assembly return address I want to write a function to print the return address of the current function. This is code that prints %ebp+4: void backtrace() { int ebp; asm ("movl %%...
BranchPredictor4000's user avatar
2 votes
1 answer
165 views

I have been reading a c++ textbook and have come across stack frames and how they work. The book outlines how stack frames are created, what they consist of and the order in which they are created. ...
ojwan's user avatar
  • 31
1 vote
1 answer
97 views

I am developing a scripting language VM. The main application is written in C++, it calls script functions that can call native function back through the native interface API, similar to JNI - Java ...
Netherwire's user avatar
  • 2,837
0 votes
0 answers
78 views

In IDA Pro, I'm trying to patch assembly to manipulate the stack/display array and allow a function to access non-local variables from an outer scope. My core question: How to calculate the correct ...
Shay Mordehay's user avatar
1 vote
0 answers
106 views

I'm trying to learn more about memory and trying to dissect a stack frame. For reference here is the source code that I'm running through gdb. #include <stdio.h> void test_function(int a, int b,...
0xChris's user avatar
  • 21
1 vote
0 answers
237 views

I'm loading the same binary to both ghidra and IDA. When looking at main(), here's what both of them show: ghidra undefined main() undefined AL:1 ...
user656857's user avatar
0 votes
1 answer
68 views

Hello I am trying to learn assembly (NASM). I watched some videos out there and now I am trying to do some codes. The code is to take a string and calculate the length of it, then pass it to a system ...
Star Dev's user avatar
0 votes
1 answer
313 views

The Microsoft Windows DbgHelp library provides three functions for walking the stack: the original StackWalk function the newer StackWalk64 function the even newer StackWalkEx function Unfortunately,...
Simon Kissane's user avatar
6 votes
1 answer
220 views

While browsing some vendor-supplied startup code for a commodity MCU and reading this excellent SO post about GCC's naked attribute, I seem to have come to a contradiction. The linked GCC ...
MysteryMoose's user avatar
  • 2,447
2 votes
1 answer
252 views

I implemented recursive fibonacci as an exercise, and the program seems to work perfectly except for one thing: when stepping through the function with gdb, the "backtrace" command just ...
pipsqueaker117's user avatar
0 votes
1 answer
113 views

The following question refers to x86 assembly, and little endianness. Suppose I have the following code in C: unsigned char myID[10] = "211866744"; How will this array be saved in memory? ...
David's user avatar
  • 63
1 vote
1 answer
78 views

I am unsure as to why i is set to 1234 during the second run of f()? I thought that when the first f() was executed to completion the stack frame for the first f() will be "popped", which I ...
Disdainty's user avatar
0 votes
0 answers
100 views

in my system (x86_64), when I'm using GDB, both RBP and RSP point to the same memory address after pushing a new stack frame, therefore I can't reference the end of the stack with the register RSP ...
strjak's user avatar
  • 15
0 votes
1 answer
204 views

I have been given this code in C and I need to calculate the bytes allocated to the stack frame of function arith. I looked everywhere for a way to do it but everyone has a different answer. long ...
Zayed Aldhaheri's user avatar
0 votes
0 answers
107 views

I have a memory dump of a program, and I am aware of the range of the stack memory. My question revolves around identifying the stack frame within this chunk of memory. In simpler terms, how can I ...
vietviet's user avatar

15 30 50 per page
1
2 3 4 5
21