Comparison of Debugging Tools in Linux and Windows: From gcore/pstack to Memory Snapshots and Thread Stack Analysis Tools

In Windows systems, there are certain differences in tools and mechanisms compared to gcore, pstack/jstack in Linux, primarily due to differences in system kernel design and debugging toolchains. Below is a specific comparison: 1. Memory Snapshot (Corresponding to Linux’s gcore) Linux: gcore Function: Generates a complete memory snapshot (core dump) of a process, including all … Read more

Understanding The Stack In Embedded Programming

Understanding The Stack In Embedded Programming

What is a Variable? Variables can generally be subdivided as shown below: The focus of this section is to help everyone understand the “stack” in the memory model, temporarily ignoring the situation of “static variables” and agreeing on the following: “Global variables” are simply assumed to be “ordinary global variables”; “Local variables” are simply assumed … Read more

Understanding the Stack in Embedded Programming

Understanding the Stack in Embedded Programming

What is a Variable? A variable can generally be classified as shown in the figure below: The focus of this section is to help everyone understand the memory model of the stack, temporarily ignoring the case of static variables, and we agree on the following: “Global variables” are simply assumed to be “ordinary global variables”; … Read more

Why Does C Language Need Stack for Function Calls While Assembly Language Does Not?

Why Does C Language Need Stack for Function Calls While Assembly Language Does Not?

Recently, I have seen many analyses about uboot, and to run C language, it is necessary to prepare the stack. In the Uboot’s start.S assembly code, regarding system initialization, I also saw the action of initializing the stack pointer. However, I have only seen people say that system initialization requires initializing the stack, that is, … Read more

Analyzing Function Calls at the Assembly Level

Analyzing Function Calls at the Assembly Level

Introduction Assembly language is the foundation for learning reverse engineering. This article analyzes function calls from the assembly level to understand the specific implementation processes of stack pushing, jumping, execution, and returning, as well as the application of the stack. My knowledge is limited, so please point out any errors or unclear points. Your encouragement … Read more

Classic! Must-Know Stack Concepts in Embedded Programming

Classic! Must-Know Stack Concepts in Embedded Programming

Word Count: 9000 Content Quality: ⭐⭐⭐⭐⭐ 1. Prerequisite Knowledge—Memory Allocation in Programs A program compiled by C/C++ occupies memory divided into the following parts: 1. Stack Area (stack)—automatically allocated and released by the compiler, used for storing function parameters and local variable values. Its operation is similar to a stack in data structures. 2. Heap … Read more

Python-ds: A Powerful Python Library for Data Structures

Python-ds: A Powerful Python Library for Data Structures

What is python-ds? First, let’s understand what python-ds is. Python-ds is a Python library designed to simplify and enhance data structure operations. It provides a rich set of data structures, including linked lists, stacks, queues, graphs, hash tables, and more, along with methods for operating on these structures, greatly reducing the workload of manually implementing … Read more

Using GDB to Inspect Program Stack Space

Using GDB to Inspect Program Stack Space

Introduction: This is a quick tutorial on how to use GDB to inspect the stack space of a C program. Word count: 7403, estimated reading time: 10 minutes https://linux.cn/article-13550-1.htmlAuthor: Julia EvansTranslator: amwps290 Yesterday, while chatting with some people, they mentioned that they didn’t really understand how the stack works and didn’t know how to inspect … Read more

Understanding Programs Through Assembly Language

Understanding Programs Through Assembly Language

1. C Language, Assembly Language, Machine Language 1.1 C Language Code The C language is a high-level language, which cannot be directly executed by the computer and needs to be translated into machine language to be recognized and run by the computer. However, machine language consists of binary numbers, and to facilitate reading, we use … Read more