stepi
is more detailed than nexti
. if you call sum()
from main()
function then doing stepi
reaches you inside the sum() function, but nexti
doesn’t.
Below is the screenshot when you call stepi
when you were at call of sum() instruction (i.e., => 0x08048403 <+40>: call 0x8048419 <sum>
). The stepi
instuction routes you inside the sum()
.
If you do nexti
when you were at call of sum() instruction (i.e., => 0x08048403 <+40>: call 0x8048419 <sum>
) then it uses the returned value from sum method and goes to the next instruction of main method, screenshot as below.
Conclusion: Use stepi
if you want to see every machine instructions that happened in your processor. Use nexti
if you wanna see only the machine instructions executed at the main()
.
Related Posts:
- How to track down a “double free or corruption” error
- How to track down a “double free or corruption” error
- Visual Studio debugger error: Unable to start program Specified file cannot be found
- gcc -g :what will happen
- What is a segmentation fault?
- How many spaces for tab character(\t)?
- What does (~0L) mean?
- What is the effect of extern “C” in C++?
- Why are #ifndef and #define used in C++ header files?
- What exactly is the difference between “pass by reference” in C and in C++?
- When to use extern “C” in simple words? [duplicate]
- Floating point exception( core dump
- Mutex example / tutorial? [closed]
- What does “dereferencing” a pointer mean?
- What is an unsigned char?
- What does “dereferencing” a pointer mean?
- Convert char to int in C and C++
- Why use conio.h?
- Convert an int to ASCII character
- Why unsigned int 0xFFFFFFFF is equal to int -1?
- What is the significance of return 0 in C and C++?
- How to go from fopen to fopen_s
- Difference between long double and double in C and C++ [duplicate]
- What is the difference between const int*, const int * const, and int const *?
- What is the C version of RMI
- How to print pthread_t
- What is the difference between const int*, const int * const, and int const *?
- wntdll.pdb not loaded – Can’t see the exception
- wntdll.pdb not loaded – Can’t see the exception
- What is the printf format specifier for bool?
- Fastest way to check if a file exist using standard C++/C++11,14,17/C?
- Is there a function to copy an array in C/C++?
- Difference between using Makefile and CMake to compile the code
- What is the difference between a static and const variable?
- Eclipse C++ : “Program “g++” not found in PATH”
- unsigned int vs. size_t
- Fatal error: iostream: No such file or directory in compiling C program using GCC
- Convert Python program to C/C++ code?
- error: expected primary-expression before ‘)’ token (C)
- Is “argv[0] = name-of-executable” an accepted standard or just a common convention?
- Examples of good gotos in C or C++
- What is activation record in the context of C and C++?
- Fastest way to check if a file exist using standard C++/C++11,14,17/C?
- Undefined reference to class constructor, including .cpp file fixes
- How to convert C++ Code to C
- Fatal error: ‘stdafx.h’ file not found
- warning: control reaches end of non-void function [-Wreturn-type]
- gcc/g++: “No such file or directory”
- What does ‘const static’ mean in C and C++?
- How to use glOrtho() in OpenGL?
- General way of solving Error: Stack around the variable ‘x’ was corrupted
- Is the sizeof(some pointer) always equal to four?
- 2D array vs array of arrays
- C++ array assign error: invalid array assignment
- How to run valgrind with basic c example?
- Typedef function pointer?
- Debug assertion failed
- “…redeclared as different kind of symbol”?
- Debug vs Release in CMake
- How can I get the list of files in a directory using C or C++?
- Debug vs Release in CMake
- How can I get the list of files in a directory using C or C++?
- What does “Permission denied” “Id returned 1 exit status” mean?
- Debug Assertion Failed: _CrtIsValidHeapPointer(block)
- gdb error not in executable format: File format not recognized
- Multi-character constant warnings
- Adding message to assert
- What is the C equivalent to the C++ cin statement?
- Static linking vs dynamic linking
- What are the different versions of exec used for in C and C++?
- C++ – Too Many Initializers for Arrays
- Reading string by char till end of line C/C++
- Is there a replacement for unistd.h for Windows (Visual C)?
- C++ – include unistd.h: why not cunistd?
- How to project a point onto a plane in 3D?
- C: using strtol endptr is never NULL, cannot check if value is integer only?
- gcc: undefined reference to
- Why use pointers?
- What’s the difference between * and & in C?
- Undefined reference to class constructor, including .cpp file fixes
- Difference between pic Vs pie
- Double pointer array in c++
- What’s the meaning of exception code “EXC_I386_GPFLT”?
- How to write log base(2) in c/c++
- What is the job of autogen.sh when building a c++ package on Linux
- What’s the Use of ‘\r’ escape sequence?
- no debugging symbols found when using gdb
- Is there a standard sign function (signum, sgn) in C/C++?
- Using OpenMP with clang
- Warning: comparison of distinct pointer types
- cc1.exe System Error – libwinpthread-1.dll missing – But it isn’t
- Two decimal places using printf( )
- Fatal error: iostream: No such file or directory in compiling C program using GCC
- Difference between the int * i and int** i
- Is there a way to compile C++ to C Code?
- gdb: No symbol “i” in current context
- Whats the difference between UInt8 and uint8_t
- “please check gdb is codesigned – see taskgated(8)” – How to get gdb installed with homebrew code signed?
- GDB no such file or directory
- The tilde operator in C