Skip to content

Commit 1932535

Browse files
committed
refactor(process): debugging in linux
1 parent f928e06 commit 1932535

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

content/OS/Process/Process (进程).md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ Author Profile:
66
tags:
77
- OS
88
- linux
9+
- devops
910
Creation Date: 2023-10-19T17:12:00
10-
Last Date: 2025-03-15T19:15:04+08:00
11-
References:
11+
Last Date: 2025-11-03T18:46:17+08:00
12+
References:
1213
description: Dive into the world of processes in operating systems!
1314
---
1415

@@ -35,6 +36,11 @@ description: Dive into the world of processes in operating systems!
3536
>
3637
> `VmRSS` represents the size of [[Main Memory#Memory Frames]] a process is currently using.
3738
39+
>[!tool] Debugging in Linux
40+
> `gcore` lets you take a full snapshot of a running process’s memory so you can debug it later in gdb, while `gstack` is a quick way to inspect all thread stack traces on the spot to see what each thread is doing (blocked on a syscall, stuck on a lock, sleeping, etc).
41+
>
42+
> They rely on `ptrace`, so you’ll need proper permissions, matching namespaces, and relaxed kernel policies if you’re inside containers or hardened environments. In short, `gcore` is for deep post-mortem analysis, and `gstack` is for fast, live insight into why your program might look stuck.
43+
3844
### Core Image
3945

4046
- A **suspended** [[Process (进程)]] consists of its [[Address Space]]

0 commit comments

Comments
 (0)