x64_cheatsheet.pdf
0.18MB

https://modoocode.com/en/inst/aaa

S = Source

D = Destination

1. 데이터 이동

1-1. 접미사 한 개

The Intel-syntax extension instructions

  • ‘movsx’ — sign-extend ‘reg8/mem8’ to ‘reg16’.
  • ‘movsx’ — sign-extend ‘reg8/mem8’ to ‘reg32’.
  • ‘movsx’ — sign-extend ‘reg8/mem8’ to ‘reg64’ (x86-64 only).
  • ‘movsx’ — sign-extend ‘reg16/mem16’ to ‘reg32’
  • ‘movsx’ — sign-extend ‘reg16/mem16’ to ‘reg64’ (x86-64 only).
  • ‘movsxd’ — sign-extend ‘reg32/mem32’ to ‘reg64’ (x86-64 only).
  • ‘movzx’ — zero-extend ‘reg8/mem8’ to ‘reg16’.
  • ‘movzx’ — zero-extend ‘reg8/mem8’ to ‘reg32’.
  • ‘movzx’ — zero-extend ‘reg8/mem8’ to ‘reg64’ (x86-64 only).
  • ‘movzx’ — zero-extend ‘reg16/mem16’ to ‘reg32’
  • ‘movzx’ — zero-extend ‘reg16/mem16’ to ‘reg64’ (x86-64 only).

are called ‘movsbw/movsxb/movsx’, ‘movsbl/movsxb/movsx’, ‘movsbq/movsb/movsx’, ‘movswl/movsxw’, ‘movswq/movsxw’, ‘movslq/movsxl’, ‘movzbw/movzxb/movzx’, ‘movzbl/movzxb/movzx’, ‘movzbq/movzxb/movzx’, ‘movzwl/movzxw’ and ‘movzwq/movzxw’ in AT&T syntax.

mov S, D ( S의 데이터를 D에 복사합니다. )

push S ( S를 스택의 맨 위에 복사하고 RSP/ESP를 4칸 올립니다. (SP 주소 값에 4 빼기) )

pop D ( 스택의 맨 위 데이터를 D에 복사하고 RSP/ESP를 4칸 내립니다. (SP 주소 값에 4 더하기) )

1-2. 접미사 없음

The Intel-syntax conversion instructions

  • ‘cbw’ — sign-extend byte in ‘%al’ to word in ‘%ax’,
  • ‘cwde’ — sign-extend word in ‘%ax’ to long in ‘%eax’,
  • ‘cwd’ — sign-extend word in ‘%ax’ to long in ‘%dx:%ax’,
  • ‘cdq’ — sign-extend dword in ‘%eax’ to quad in ‘%edx:%eax’,
  • ‘cdqe’ — sign-extend dword in ‘%eax’ to quad in ‘%rax’ (x86-64 only),
  • ‘cqo’ — sign-extend quad in ‘%rax’ to octuple in ‘%rdx:%rax’ (x86-64 only),

are called ‘cbtw’, ‘cwtl’, ‘cwtd’, ‘cltd’, ‘cltq’, and ‘cqto’ in AT&T naming. as accepts either naming for these instructions.

cbw(Convert Byte to Word) ( AL을 부호 확장을 해서 AX로 만듭니다. )

cwde(Convert Word to Dword) ( AX를 부호 확장을 해서 EAX로 만듭니다. )

cwd(Convert Word to Dword) ( AX를 부호 확장을 해서 DX와 AX에 저장합니다. )

cdq(Convert Dword to Quad) ( EAX를 부호 확장을 해서 EDX와 EAX에 저장합니다. )

cdqe(Convert Dword to Quad) (EAX를 부호 확장을 해서 RAX에 저장합니다. )(x64 전용)

cqo(Convert Quad to Octuple) (RAX를 부호 확장을 해서 RDX와 RAX에 저장합니다. )(x64 전용)

2. 산술 연산

2-1. 단항 연산

inc D ( D에 1을 더합니다. )

dec D ( D에 1을 뺍니다. )

neg D ( 2의 보수 )

not D ( not 비트 연산 )

2-2. 비트 연산

lea S, D ( D의 주소를 계산하여 S에 저장합니다. )

add S, D ( S와 D를 더한 값을 S에 저장합니다. 피연산자에 메모리 주소를 넣을 순 있지만 두 개 모두 메모리 주소를 넣을 순 없습니다. )

sub S, D ( S에서 D를 뺀 값을 S에 저장합니다.)

imul S, D ( 부호 있는 곱하기, S와 D를 곱해서 S에 저장합니다. )

mul S, D ( 부호 없는 곱하기, S와 D를 곱해서 S에 저장합니다. )

xor S, D ( S와 D를 xor 하고 결과를 S에 저장합니다. )

or S, D ( S와 D를 or 연산하고 결과를 S에 저장합니다. )

and S, D ( S와 D를 and 연산하고 결과를 S에 저장합니다. )

3. 분기

cmp S, D ( S와 D를 비교하여 ZF랑 CF에 저장한다. )

3-1. 무조건분기

jmp L ( L 위치로 무조건 이동 )

3-2. 조건분기

명령어 의미 부등호 플래그 조건
ja jump if avobe > CF = 0 and ZF = 0
jae jump if avobe or equal >= CF = 0 or ZF = 1
jb jump if below < CF = 1
jbe jump if below or equal <= CF = 1 or ZF = 1
jc jump if carry flag set   CF = 1
jcxz jump if CX is 0   CX = 0
je jump if equal == ZF = 1
jecxz jump if ECX is 0   ECX = 0
jg jump if grater(signed) > ZF = 0, and SF = OF
jz jump if zero == ZF = 1

4. 호출

call L ( L 함수 호출 )

728x90

1. 스택

스택은 지역변수나 매개변수를 저장하는 영역입니다.

높은 주소부터 시작해 낮은 주소로 점점 늘어납니다.

스택 영역이 점점 늘어나서 힙 영역을 침범하면 스택 오버플로우가 일어납니다.

 

스택 영역엔 스택 프레임이란게 존재하는데

이러한 식으로 함수를 호출할 때 마다 스택프레임이 쌓이고

함수가 종료되면 스택프레임이 사라집니다.

2. 디버거에서 테스트

위 세 함수 모두 시작 부분에

push rbp

mov rbp, rsp

명령어가 있다.

이것이 무슨 뜻이냐면 새로운 스택 프레임을 생성하는 코드이다.

단계적으로 실행시키면서 봐보자.

push rbp를 실행하기 전이다.

rbp의 값인 0x7fffffffe3d0가 rsp의 위치에 들어갔다!

rsp의 위치에 원래 rbp의 위치를 넣어주는 이유는

현재 스택 프레임이 종료되면 rbp를 원래 rbp 위치로 옮겨줘야 하기 때문이다.

mov rbp, rsp를 실행하니,

rsp의 위치에 rbp가 실제로 위치하게 되었다.

이것은 즉 rbp의 값이 rsp의 값과 같아졌다는 뜻이다.

그리고 sub rsp, 0x30을 해줘서 0x30만큼 rsp를 위로 올린다(rsp에서 0x30만큼 뺀다)는 뜻이다.

0x30만큼 위로 올라갔기 때문에 0x30만큼 스택의 크기가 늘었다.

이것이 스택프레임을 생성하는 과정이다.

 

함수가 종료될 때 leave 명령어가 실행되면 자동으로 스택프레임도 지워지게 된다.

728x90

x64 Cheat Sheet

 

설명 64bit 32bit 16bit 8bit 8bit
Accumulator RAX EAX AX AH AL
Base RBX EBX BX BH BL
Counter RCX ECX CX CH CL
Data RDX EDX DX DH DL
  RDI EDI DI DIL  
  RSI ESI SI SIL  
Numbered(8~15) R$n$ R$n$D R$n$W R$n$B  
Stack pointer RSP ESP SP SPL  
Frame pointer RBP EBP BP BPL  
Name Notes Type 64-bit
long
32-bit
int
16-bit
short
8-bit
char
rax 함수의 반환값을 이 레지스터에 저장해둡니다. scratch rax eax ax ah and al
rcx 전형적인 Scratch 레지스터.  몇몇 명령어에선 카운터로도 사용합니다. scratch rcx ecx cx ch and cl
rdx Scratch 레지스터. scratch rdx edx dx dh and dl
rbx
Preserved 레지스터: 저장 없이 사용하지 마세요! preserved rbx ebx bx bh and bl
rsp
스택 포인터.  스택의 맨 위를 가리킵니다.
preserved rsp esp sp spl
rbp
Preserved 레지스터.  때로 스택 포인터의 이전 값 또는 "스택 프레임의 베이스"를 저장하는 데 사용됩니다. preserved rbp ebp bp bpl
rsi 64bit 리눅스에선 scratch 레지스터이자 두번째 함수의 인자를 넘겨줍니다.
64bit 윈도우에선 preserved 레지스터 입니다.
scratch rsi esi si sil
rdi 64bit 리눅스에선 scratch 레지스터와 함수의 첫번째 인자값을 넘겨줍니다.
64bit 윈도우에선 preserved 레지스터 입니다.
scratch rdi edi di dil
r8
Scratch 레지스터.  이것들은 64비트 모드에서 추가되었습니다. 그래서 이름 대신 숫자를 가지고 있습니다. scratch r8 r8d r8w r8b
r9
Scratch 레지스터. scratch r9 r9d r9w r9b
r10
Scratch 레지스터. scratch r10 r10d r10w r10b
r11
Scratch 레지스터. scratch r11 r11d r11w r11b
r12
Preserved 레지스터.  사용은 할 수 있지만, 저장하고 사용 후 복구해야 합니다.
preserved r12 r12d r12w r12b
r13
Preserved 레지스터. preserved r13 r13d r13w r13b
r14
Preserved 레지스터. preserved r14 r14d r14w r14b
r15
Preserved 레지스터. preserved r15 r15d r15w r15b

Scratch 레지스터 : 원하는 모든 용도로 사용할 수 있습니다.

Preserved 레지스터 : 다른 곳에서 중요한 용도로 사용되므로 사용하는 경우 원래 값을 저장해 두고 사용한 후에 다시 원래 값으로 돌려놔야 합니다.

빨간색 : 64비트에서만 존재하는 레지스터입니다.

 

참고로 함수 호출할때 인자를 넘겨주는데 어셈블리로 바꾸면 함수를 호출할 때 여러가지의 값을 넘겨줄 수 없기 때문에어떤 레지스터에 몇번째 인자를 저장해야 하는지 정해진 호출 규약이 있습니다.x86-64에는 두가지의 호출규약이 있습니다.

마이크로소프트 x64 호출 규약시스템 V AMD64 ABI이 있습니다.

마이크로소프트 x64 호출 규약

마이크로소프트 x64 호출 규약은 윈도우(마이크로소프트 비주얼 C++, 인텔 C++ 컴파일러, 엠바카데로 컴파일러), UEFI 등에서 사용합니다.

1. RCX/XMM0

2. RDX/XMM1

3. R8/XMM2

4. R9/XMM3

이 이후 인자부터는 스택에 들어갑니다.

인자 타입 1번째 2번째 3번째 4번째 5번째 이상
부동 소수점 XMM0 XMM1 XMM2 XMM3 스택
정수 RCX RDX R8 R9 스택
자료형(8, 16, 32 또는 64비트 자료형), __m64 RCX RDX R8 R9 스택
모든 포인터 RCX RDX R8 R9 스택

XMM$n$은 128bit짜리 대형 레지스터 입니다.

시스템 V AMD64 ABI

시스템 V AMD64 ABI는 GNU/리눅스, BSD, OS X(GCC, 인텔 C++ 컴파일러) 등에서 사용합니다.

인자 타입 1번째 2번째 3번째 4번째 5번째 6번째 7번째 이상
부동 소수점, __m256 XMM0 XMM1 XMM2 XMM3 XMM4 XMM5 XMM6~XMM7
나머지 자료형 RDI RSI RDX RCX R8 R9 스택
포인터 RDI RSI RDX RCX R8 R9 스택

레지스터 설명
호출 규약 예제

보기 좀 불편하게 예제가 되어있지만 정리해보자면

s.a, s.b = int(4byte) + int(4byte) = 8byte(64bit)

s.d = double(8byte)

 

ld = long double(16 or 8byte)(여기선 16byte, 128bit)

long double 형식은 X87 클래스에 속한다. X87 클래스는 스택에 저장되는것 같다.

 

일반적인 레지스터

XMM, YMM

스택

func (e, f, s, g, h, ld, m, y, n, i, j, k)

e, f, (s.a, s.b), g, h, i 순서대로 6개의 레지스터에 값이 저장되게 됩니다.

그 다음에 나오는 j k는 레지스터를 다 사용했으므로 스택 프레임에 저장되게 됩니다.

s.d 는 부동소수점이기 때문에 XMM부분에 들어가고

m, y, n도 순차적으로 들어가게 됩니다.

근데 y만 YMM에 저장되어 있는데 y가 __m256 형식이라서 128bit 크기의 XMM에는 넣을 수 없기 때문에 YMM에 넣게 됩니다.

ld는 정확히는 모르지만 여러가지 이유로 스택에 저장되는것 같다.

 

YMM은 256bit 짜리 레지스터 입니다.

 

이러한 코드를 짜고 test 함수에 breakpoint 를 걸고 진행해봤다.

예상대로면

i1 = RDI = 1

i2 = RSI = 2

i3 = RDX = 3

이런 형태가 나올것이다.

 RAX  0x3ff8000000000000
 RBX  0x555555555210 (__libc_csu_init) ◂— endbr64
 RCX  0x7ffff7edf1e7 (write+23) ◂— cmp    rax, -0x1000 /* 'H=' */
 RDX  0x3
 RDI  0x1
 RSI  0x2
 R8   0x16
 R9   0x7c
 R10  0x7ffff7fb9be0 (main_arena+96) —▸ 0x5555555596a0 ◂— 0x0
 R11  0x246
 R12  0x555555555060 (_start) ◂— endbr64
 R13  0x7fffffffe4e0 ◂— 0x1
 R14  0x0
 R15  0x0
 RBP  0x7fffffffe3d0 ◂— 0x0
 RSP  0x7fffffffe358 —▸ 0x5555555551e8 (main+113) ◂— add    rsp, 0x40
 RIP  0x555555555149 (test) ◂— endbr64

 

RDI = 0x1

RSI = 0x2

RDX = 0x3

예상한 그대로 나왔다!

 

부동 소수점은 계산하기 힘드니까 제외했다.

728x90

ctrl+c

: 리눅스에서 기본적으로 interrupt 신호

 

quit, q

: 종료

reload

: pwndbg 리로드

run, r

: run, 실행

continue, fg, c

: continue, 계속

vmmap

: 메모리 상황

b *[주소값]

: break point

del [번호]

: break point 삭제

ni, si

: 한 줄씩 코드 진행, 함수 내부까지 진행

set *[주소값]=[값]

: 해당 주소값의 값 임의변경

k

: call stack 목록

 

heap

: heap 상태

 

context

: 디버깅 정보 화면 다시 띄움

 

comm

: 주석 달기

 

apropos 단어

: 도움말에서 연관된 명령어 검색

 

더보기

pwndbg> help
List of classes of commands:

aliases -- User-defined aliases of other commands.
breakpoints -- Making program stop at certain points.
data -- Examining data.
files -- Specifying and examining files.
internals -- Maintenance commands.
obscure -- Obscure features.
running -- Running the program.
status -- Status inquiries.
support -- Support facilities.
text-user-interface -- TUI is the GDB text based interface.
tracepoints -- Tracing of program execution without stopping the program.
user-defined -- User-defined commands.

Type "help" followed by a class name for a list of commands in that class.
Type "help all" for the list of all commands.
Type "help" followed by command name for full documentation.
Type "apropos word" to search for commands related to "word".
Type "apropos -v word" for full documentation of commands related to "word".
Command name abbreviations are allowed if unambiguous.

 

더보기

pwndbg> help all

Command class: aliases


Command class: breakpoints

awatch -- Set a watchpoint for an expression.
break, brea, bre, br, b -- Set breakpoint at specified location.
break-range -- Set a breakpoint for an address range.
catch -- Set catchpoints to catch events.
catch assert -- Catch failed Ada assertions, when raised.
catch catch -- Catch an exception, when caught.
catch exception -- Catch Ada exceptions, when raised.
catch exec -- Catch calls to exec.
catch fork -- Catch calls to fork.
catch handlers -- Catch Ada exceptions, when handled.
catch load -- Catch loads of shared libraries.
catch rethrow -- Catch an exception, when rethrown.
catch signal -- Catch signals by their names and/or numbers.
catch syscall -- Catch system calls by their names, groups and/or numbers.
catch throw -- Catch an exception, when thrown.
catch unload -- Catch unloads of shared libraries.
catch vfork -- Catch calls to vfork.
clear, cl -- Clear breakpoint at specified location.
commands -- Set commands to be executed when the given breakpoints are hit.
condition -- Specify breakpoint number N to break only if COND is true.
delete, del, d -- Delete all or some breakpoints.
delete bookmark -- Delete a bookmark from the bookmark list.
delete breakpoints -- Delete all or some breakpoints or auto-display expressions.
delete checkpoint -- Delete a checkpoint (experimental).
delete display -- Cancel some expressions to be displayed when program stops.
delete mem -- Delete memory region.
delete tracepoints, delete tr -- Delete specified tracepoints.
delete tvariable -- Delete one or more trace state variables.
disable, disa, dis -- Disable all or some breakpoints.
disable breakpoints -- Disable all or some breakpoints.
disable display -- Disable some expressions to be displayed when program stops.
disable frame-filter -- GDB command to disable the specified frame-filter.
disable mem -- Disable memory region.
disable pretty-printer -- GDB command to disable the specified pretty-printer.
disable probes -- Disable probes.
disable type-printer -- GDB command to disable the specified type-printer.
disable unwinder -- GDB command to disable the specified unwinder.
disable xmethod -- GDB command to disable a specified (group of) xmethod(s).
dprintf -- Set a dynamic printf at specified location.
enable, en -- Enable all or some breakpoints.
enable breakpoints -- Enable all or some breakpoints.
enable breakpoints count -- Enable some breakpoints for COUNT hits.
enable breakpoints delete -- Enable some breakpoints and delete when hit.
enable breakpoints once -- Enable some breakpoints for one hit.
enable count -- Enable some breakpoints for COUNT hits.
enable delete -- Enable some breakpoints and delete when hit.
enable display -- Enable some expressions to be displayed when program stops.
enable frame-filter -- GDB command to enable the specified frame-filter.
enable mem -- Enable memory region.
enable once -- Enable some breakpoints for one hit.
enable pretty-printer -- GDB command to enable the specified pretty-printer.
enable probes -- Enable probes.
enable type-printer -- GDB command to enable the specified type printer.
enable unwinder -- GDB command to enable unwinders.
enable xmethod -- GDB command to enable a specified (group of) xmethod(s).
ftrace -- Set a fast tracepoint at specified location.
hbreak -- Set a hardware assisted breakpoint.
ignore -- Set ignore-count of breakpoint number N to COUNT.
rbreak -- Set a breakpoint for all functions matching REGEXP.
rwatch -- Set a read watchpoint for an expression.
save -- Save breakpoint definitions as a script.
save breakpoints -- Save current breakpoint definitions as a script.
save gdb-index -- Save a gdb-index file.
save tracepoints, save-tracepoints -- Save current tracepoint definitions as a script.
skip -- Ignore a function while stepping.
skip delete -- Delete skip entries.
skip disable -- Disable skip entries.
skip enable -- Enable skip entries.
skip file -- Ignore a file while stepping.
skip function -- Ignore a function while stepping.
strace -- Set a static tracepoint at location or marker.
tbreak -- Set a temporary breakpoint.
tcatch -- Set temporary catchpoints to catch events.
tcatch assert -- Catch failed Ada assertions, when raised.
tcatch catch -- Catch an exception, when caught.
tcatch exception -- Catch Ada exceptions, when raised.
tcatch exec -- Catch calls to exec.
tcatch fork -- Catch calls to fork.
tcatch handlers -- Catch Ada exceptions, when handled.
tcatch load -- Catch loads of shared libraries.
tcatch rethrow -- Catch an exception, when rethrown.
tcatch signal -- Catch signals by their names and/or numbers.
tcatch syscall -- Catch system calls by their names, groups and/or numbers.
tcatch throw -- Catch an exception, when thrown.
tcatch unload -- Catch unloads of shared libraries.
tcatch vfork -- Catch calls to vfork.
thbreak -- Set a temporary hardware assisted breakpoint.
trace, trac, tra, tr, tp -- Set a tracepoint at specified location.
watch -- Set a watchpoint for an expression.

Command class: data

agent-printf -- Target agent only formatted printing, like the C "printf" function.
append -- Append target code/data to a local file.
append binary -- Append target code/data to a raw binary file.
append binary memory -- Append contents of memory to a raw binary file.
append binary value -- Append the value of an expression to a raw binary file.
append memory -- Append contents of memory to a raw binary file.
append value -- Append the value of an expression to a raw binary file.
call -- Call a function in the program.
disassemble -- Disassemble a specified section of memory.
display -- Print value of expression EXP each time the program stops.
dump -- Dump target code/data to a local file.
dump binary -- Write target code/data to a raw binary file.
dump binary memory -- Write contents of memory to a raw binary file.
dump binary value -- Write the value of an expression to a raw binary file.
dump ihex -- Write target code/data to an intel hex file.
dump ihex memory -- Write contents of memory to an ihex file.
dump ihex value -- Write the value of an expression to an ihex file.
dump memory -- Write contents of memory to a raw binary file.
dump srec -- Write target code/data to an srec file.
dump srec memory -- Write contents of memory to an srec file.
dump srec value -- Write the value of an expression to an srec file.
dump tekhex -- Write target code/data to a tekhex file.
dump tekhex memory -- Write contents of memory to a tekhex file.
dump tekhex value -- Write the value of an expression to a tekhex file.
dump value -- Write the value of an expression to a raw binary file.
dump verilog -- Write target code/data to a verilog hex file.
dump verilog memory -- Write contents of memory to a verilog hex file.
dump verilog value -- Write the value of an expression to a verilog hex file.
explore -- Explore a value or a type valid in the current context.
explore type -- Explore a type or the type of an expression.
explore value -- Explore value of an expression valid in the current context.
find -- Search memory for a sequence of bytes.
init-if-undefined -- Initialize a convenience variable if necessary.
mem -- Define attributes for memory region or reset memory region handling to target-based.
output -- Like "print" but don't put in value history and don't print newline.
print, inspect, p -- Print value of expression EXP.
print-object, po -- Ask an Objective-C object to print itself.
printf -- Formatted printing, like the C "printf" function.
ptype -- Print definition of type TYPE.
restore -- Restore the contents of FILE to target memory.
set -- Evaluate expression EXP and assign result to variable VAR.
set ada -- Prefix command for changing Ada-specific settings.
set ada print-signatures -- Enable or disable the output of formal and return types for functions in the overloads selection menu.
set ada trust-PAD-over-XVS -- Enable or disable an optimization trusting PAD types over XVS types.
set agent -- Set debugger's willingness to use agent as a helper.
set annotate -- Set annotation_level.
set architecture, set processor -- Set architecture of target.
set args -- Set argument list to give program being debugged when it is started.
set auto-connect-native-target -- Set whether GDB may automatically connect to the native target.
set auto-load -- Auto-loading specific settings.
set auto-load gdb-scripts -- Enable or disable auto-loading of canned sequences of commands scripts.
set auto-load libthread-db -- Enable or disable auto-loading of inferior specific libthread_db.
set auto-load local-gdbinit -- Enable or disable auto-loading of .gdbinit script in current directory.
set auto-load python-scripts -- Set the debugger's behaviour regarding auto-loaded Python scripts.
set auto-load safe-path -- Set the list of files and directories that are safe for auto-loading.
set auto-load scripts-directory -- Set the list of directories from which to load auto-loaded scripts.
set auto-save-search -- Set automatically pass --save to "search" command
set auto-solib-add -- Set autoloading of shared library symbols.
set backtrace -- Set backtrace specific variables.
set backtrace limit -- Set an upper bound on the number of backtrace levels.
set backtrace past-entry -- Set whether backtraces should continue past the entry point of a program.
set backtrace past-main -- Set whether backtraces should continue past "main".
set backtrace-address-color -- Set color for backtrace (address)
set backtrace-frame-label -- Set frame number label for backtrace
set backtrace-frame-label-color -- Set color for backtrace (frame label)
set backtrace-prefix -- Set prefix for current backtrace label
set backtrace-prefix-color -- Set color for prefix of current backtrace label
set backtrace-symbol-color -- Set color for backtrace (symbol)
set banner-color -- Set color for banner line
set banner-separator -- Set repeated banner separator character
set banner-title-color -- Set color for banner title
set banner-title-position -- Set banner title position
set banner-title-surrounding-left -- Set banner title surrounding char (left side)
set banner-title-surrounding-right -- Set banner title surrounding char (right side)
set basenames-may-differ -- Set whether a source file may have multiple base names.
set breakpoint -- Breakpoint specific settings.
set breakpoint always-inserted -- Set mode for inserting breakpoints.
set breakpoint auto-hw -- Set automatic usage of hardware breakpoints.
set breakpoint condition-evaluation -- Set mode of breakpoint condition evaluation.
set breakpoint pending -- Set debugger's behavior regarding pending breakpoints.
set can-use-hw-watchpoints -- Set debugger's willingness to use watchpoint hardware.
set case-sensitive -- Set case sensitivity in name search (on/off/auto).
set chain-arrow-color -- Set color of chain formatting (arrow)
set chain-arrow-left -- Set left arrow of chain formatting
set chain-arrow-right -- Set right arrow of chain formatting
set chain-contiguous-marker -- Set contiguous marker of chain formatting
set chain-contiguous-marker-color -- Set color of chain formatting (contiguous marker)
set charset -- Set the host and target character sets.
set check, set ch, set c -- Set the status of the type/range checker.
set check range -- Set range checking (on/warn/off/auto).
set check type -- Set strict type checking.
set circular-trace-buffer -- Set target's use of circular trace buffer.
set code-cache -- Set cache use for code segment access.
set code-prefix -- Set prefix marker for 'context code' command
set code-prefix-color -- Set color for 'context code' command (prefix marker)
set coerce-float-to-double -- Set coercion of floats to doubles when calling functions.
set comment-color -- Set color for comment
set compile-args -- Set compile command GCC command-line arguments.
set compile-gcc -- Set compile command GCC driver filename.
set complaints -- Set max number of complaints about incorrect symbols.
set confirm -- Set whether to confirm potentially dangerous operations.
set context-backtrace-lines -- Set number of lines to print in the backtrace context
set context-clear-screen -- Set whether to clear the screen before printing the context
set context-code-lines -- Set number of additional lines to print in the code context
set context-flag-bracket-color -- Set color for flags register (bracket)
set context-flag-changed-color -- Set color for flags register (flag changed)
set context-flag-set-color -- Set color for flags register (flag set)
set context-flag-unset-color -- Set color for flags register (flag unset)
set context-flag-value-color -- Set color for flags register (register value)
set context-ghidra -- Set when to try to decompile the current function with ghidra (slow and requires radare2/r2pipe) (valid values: always, never, if-no-source)
set context-output -- Set where pwndbg should output ("stdout" or file/tty).
set context-register-changed-color -- Set color for registers label (change marker)
set context-register-changed-marker -- Set change marker for registers label
set context-register-color -- Set color for registers label
set context-sections -- Set which context sections are displayed (controls order)
set context-source-code-lines -- Set number of source code lines to print by the context command
set context-stack-lines -- Set number of lines to print in the stack context
set cp-abi -- Set the ABI used for inspecting C++ objects.
set cwd -- Set the current working directory to be used when the inferior is started.
set data-directory -- Set GDB's data directory.
set dcache -- Use this command to set number of lines in dcache and line-size.
set dcache line-size -- Set dcache line size in bytes (must be power of 2).
set dcache size -- Set number of dcache lines.
set debug -- Generic command for setting gdb debugging flags.
set debug arch -- Set architecture debugging.
set debug auto-load -- Set auto-load verifications debugging.
set debug bfd-cache -- Set bfd cache debugging.
set debug check-physname -- Set cross-checking of "physname" code against demangler.
set debug coff-pe-read -- Set coff PE read debugging.
set debug compile -- Set compile command debugging.
set debug compile-cplus-scopes -- Set debugging of C++ compile scopes.
set debug compile-cplus-types -- Set debugging of C++ compile type conversion.
set debug displaced -- Set displaced stepping debugging.
set debug dwarf-die -- Set debugging of the DWARF DIE reader.
set debug dwarf-line -- Set debugging of the dwarf line reader.
set debug dwarf-read -- Set debugging of the DWARF reader.
set debug entry-values -- Set entry values and tail call frames debugging.
set debug expression -- Set expression debugging.
set debug frame -- Set frame debugging.
set debug index-cache -- Set display of index-cache debug messages.
set debug infrun -- Set inferior debugging.
set debug jit -- Set JIT debugging.
set debug libthread-db -- Set libthread-db debugging.
set debug lin-lwp -- Set debugging of GNU/Linux lwp module.
set debug linux-namespaces -- Set debugging of GNU/Linux namespaces module.
set debug notification -- Set debugging of async remote notification.
set debug observer -- Set observer debugging.
set debug overload -- Set debugging of C++ overloading.
set debug parser -- Set parser debugging.
set debug py-unwind -- Set Python unwinder debugging.
set debug record -- Set debugging of record/replay feature.
set debug remote -- Set debugging of remote protocol.
set debug remote-packet-max-chars -- Set the maximum number of characters to display for each remote packet.
set debug separate-debug-file -- Set printing of separate debug info file search debug.
set debug serial -- Set serial debugging.
set debug skip -- Set whether to print the debug output about skipping files and functions.
set debug stap-expression -- Set SystemTap expression debugging.
set debug symbol-lookup -- Set debugging of symbol lookup.
set debug symfile -- Set debugging of the symfile functions.
set debug symtab-create -- Set debugging of symbol table creation.
set debug target -- Set target debugging.
set debug timestamp -- Set timestamping of debugging messages.
set debug varobj -- Set varobj debugging.
set debug xml -- Set XML parser debugging.
set debug-events -- Set display internal event debugging info
set debug-file-directory -- Set the directories where separate debug symbols are searched for.
set default-collect -- Set the list of expressions to collect by default.
set demangle-style -- Set the current C++ demangling style.
set dereference-limit -- Set max number of pointers to dereference in a chain
set detach-on-fork -- Set whether gdb will detach the child of a fork.
set directories -- Set the search path for finding source files.
set disable-colors -- Set whether to color the output or not
set disable-randomization -- Set disabling of debuggee's virtual address space randomization.
set disasm-branch-color -- Set color for disasm (branch/call instruction)
set disassemble-next-line -- Set whether to disassemble next source line or insn when execution stops.
set disassembler-options -- Set the disassembler options.
set disassembly-flavor -- Set the disassembly flavor.
set disconnected-dprintf -- Set whether dprintf continues after GDB disconnects.
set disconnected-tracing -- Set whether tracing continues after GDB disconnects.
set displaced-stepping -- Set debugger's willingness to use displaced stepping.
set dprintf-channel -- Set the channel to use for dynamic printf.
set dprintf-function -- Set the function to use for dynamic printf.
set dprintf-style -- Set the style of usage for dynamic printf.
set dump-excluded-mappings -- Set whether gcore should dump mappings marked with the VM_DONTDUMP flag.
set editing -- Set editing of command lines as they are typed.
set emulate -- Set
set endian -- Set endianness of target.
set enhance-comment-color -- Set color of value enhance (comment)
set enhance-integer-value-color -- Set color of value enhance (integer)
set enhance-string-value-color -- Set color of value enhance (string)
set enhance-unknown-color -- Set color of value enhance (unknown value)
set environment -- Set environment variable value to give the program.
set exception-debugger -- Set whether to debug exceptions raised in Pwndbg commands
set exception-verbose -- Set whether to print a full stacktrace for exceptions raised in Pwndbg commands
set exec-direction -- Set direction of execution.
set exec-done-display -- Set notification of completion for asynchronous execution commands.
set exec-file-mismatch -- Set exec-file-mismatch handling (ask|warn|off).
set exec-wrapper -- Set a wrapper for running programs.
set extended-prompt -- Set the extended prompt.
set extension-language -- Set mapping between filename extension and source language.
set filename-display -- Set how to display filenames.
set follow-exec-mode -- Set debugger response to a program call of exec.
set follow-fork-mode -- Set debugger response to a program call of fork or vfork.
set frame-filter -- Prefix command for 'set' frame-filter related operations.
set frame-filter priority -- GDB command to set the priority of the specified frame-filter.
set gnutarget, set g -- Set the current BFD target.
set guile, set gu -- Prefix command for Guile preference settings.
set guile print-stack -- Set mode for Guile exception printing on error.
set heap-dereference-limit -- Set number of bins to dereference
set height -- Set number of lines in a page for GDB output pagination.
set hexdump-address-color -- Set color for hexdump command (address label)
set hexdump-ascii-block-separator -- Set block separator char of the hexdump command
set hexdump-byte-separator -- Set separator of single bytes in hexdump (does NOT affect group separator)
set hexdump-bytes -- Set number of bytes printed by hexdump command
set hexdump-colorize-ascii -- Set whether to colorize the hexdump command ascii section
set hexdump-group-use-big-endian -- Set Use big-endian within each group of bytes. Only applies to raw bytes, not the ASCII part. See also hexdump-highlight-group-lsb.
set hexdump-group-width -- Set number of bytes grouped in hexdump command (If -1, the architecture's pointer size is used)
set hexdump-highlight-group-lsb -- Set highlight LSB of each group. Applies only if hexdump-adjust-group-endianess actually changes byte order.
set hexdump-normal-color -- Set color for hexdump command (normal bytes)
set hexdump-offset-color -- Set color for hexdump command (offset label)
set hexdump-printable-color -- Set color for hexdump command (printable characters)
set hexdump-separator-color -- Set color for hexdump command (group separator)
set hexdump-special-color -- Set color for hexdump command (special bytes)
set hexdump-width -- Set line width of hexdump command
set hexdump-zero-color -- Set color for hexdump command (zero bytes)
set highlight-color -- Set color added to highlights like source/pc
set highlight-pc -- Set whether to highlight the current instruction
set highlight-source -- Set whether to highlight the closest source line
set history -- Generic command for setting command history parameters.
set history expansion -- Set history expansion on command input.
set history filename -- Set the filename in which to record the command history.
set history remove-duplicates -- Set how far back in history to look for and remove duplicate entries.
set history save -- Set saving of the history record on exit.
set history size -- Set the size of the command history.
set host-charset -- Set the host character set.
set ida-enabled -- Set whether to enable ida integration
set ida-rpc-host -- Set ida xmlrpc server address
set ida-rpc-port -- Set ida xmlrpc server port
set ida-timeout -- Set time to wait for ida xmlrpc in seconds
set index-cache -- Set index-cache options.
set index-cache directory -- Set the directory of the index cache.
set index-cache off -- Disable the index cache.
set index-cache on -- Enable the index cache.
set inferior-tty, tty -- Set terminal for future runs of program being debugged.
set input-radix -- Set default input radix for entering numbers.
set interactive-mode -- Set whether GDB's standard input is a terminal.
set language -- Set the current source language.
set left-pad-disasm -- Set whether to left-pad disassembly
set libthread-db-search-path -- Set search path for libthread_db.
set listsize -- Set number of source lines gdb will list by default.
set logging -- Set logging options.
set logging debugredirect -- Set the logging debug output mode.
set logging file -- Set the current logfile.
set logging off -- Disable logging.
set logging on -- Enable logging.
set logging overwrite -- Set whether logging overwrites or appends to the log file.
set logging redirect -- Set the logging output mode.
set max-completions -- Set maximum number of completion candidates.
set max-user-call-depth -- Set the max call depth for non-python/scheme user-defined commands.
set max-value-size -- Set maximum sized value gdb will load from the inferior.
set may-call-functions -- Set permission to call functions in the program.
set may-insert-breakpoints -- Set permission to insert breakpoints in the target.
set may-insert-fast-tracepoints -- Set permission to insert fast tracepoints in the target.
set may-insert-tracepoints -- Set permission to insert tracepoints in the target.
set may-interrupt -- Set permission to interrupt or signal the target.
set may-write-memory -- Set permission to write into target memory.
set may-write-registers -- Set permission to write into registers.
set mem -- Memory regions settings.
set mem inaccessible-by-default -- Set handling of unknown memory regions.
set memory-code-color -- Set color for executable memory
set memory-data-color -- Set color for all other writable memory
set memory-heap-color -- Set color for heap memory
set memory-rodata-color -- Set color for all read only memory
set memory-rwx-color -- Set color added to all RWX memory
set memory-stack-color -- Set color for stack memory
set message-breakpoint-color -- Set color of breakpoint messages
set message-error-color -- Set color of error messages
set message-exit-color -- Set color of exit messages
set message-hint-color -- Set color of hint and marker messages
set message-notice-color -- Set color of notice messages
set message-signal-color -- Set color of signal messages
set message-status-off-color -- Set color of off status messages
set message-status-on-color -- Set color of on status messages
set message-success-color -- Set color of success messages
set message-system-color -- Set color of system messages
set message-warning-color -- Set color of warning messages
set mi-async, set target-async -- Set whether MI asynchronous mode is enabled.
set mpx -- Set Intel Memory Protection Extensions specific variables.
set mpx bound -- Set the memory bounds for a given array/pointer storage in the bound table.
set multiple-symbols -- Set how the debugger handles ambiguities in expressions.
set nearpc-address-color -- Set color for nearpc command (address)
set nearpc-argument-color -- Set color for nearpc command (target argument)
set nearpc-branch-marker -- Set branch marker line for nearpc command
set nearpc-branch-marker-color -- Set color for nearpc command (branch marker line)
set nearpc-branch-marker-contiguous -- Set contiguous branch marker line for nearpc command
set nearpc-ida-anterior-color -- Set color for nearpc command (IDA anterior)
set nearpc-lines -- Set number of additional lines to print for the nearpc command
set nearpc-prefix -- Set prefix marker for nearpc command
set nearpc-prefix-color -- Set color for nearpc command (prefix marker)
set nearpc-show-args -- Set show call arguments below instruction
set nearpc-symbol-color -- Set color for nearpc command (symbol)
set nearpc-syscall-name-color -- Set color for nearpc command (resolved syscall name)
set non-stop -- Set whether gdb controls the inferior in non-stop mode.
set observer -- Set whether gdb controls the inferior in observer mode.
set opaque-type-resolution -- Set resolution of opaque struct/class/union types (if set before loading symbols).
set osabi -- Set OS ABI of target.
set output-radix -- Set default output radix for printing of values.
set overload-resolution -- Set overload resolution in evaluating C++ functions.
set pagination -- Set state of GDB output pagination.
set print, set pr, set p -- Generic command for setting how things print.
set print address -- Set printing of addresses.
set print array -- Set pretty formatting of arrays.
set print array-indexes -- Set printing of array indexes.
set print asm-demangle -- Set demangling of C++/ObjC names in disassembly listings.
set print demangle -- Set demangling of encoded C++/ObjC names when displaying symbols.
set print elements -- Set limit on string chars or array elements to print.
set print entry-values -- Set printing of function arguments at function entry.
set print finish -- Set whether `finish' prints the return value.
set print frame-arguments -- Set printing of non-scalar frame arguments.
set print frame-info -- Set printing of frame information.
set print inferior-events -- Set printing of inferior events (such as inferior start and exit).
set print max-depth -- Set maximum print depth for nested structures, unions and arrays.
set print max-symbolic-offset -- Set the largest offset that will be printed in <SYMBOL+1234> form.
set print null-stop -- Set printing of char arrays to stop at first null char.
set print object -- Set printing of C++ virtual function tables.
set print pascal_static-members -- Set printing of pascal static members.
set print pretty -- Set pretty formatting of structures.
set print raw-frame-arguments -- Set whether to print frame arguments in raw form.
set print raw-values -- Set whether to print values in raw form.
set print repeats -- Set threshold for repeated print elements.
set print sevenbit-strings -- Set printing of 8-bit characters in strings as \nnn.
set print static-members -- Set printing of C++ static members.
set print symbol -- Set printing of symbol names when printing pointers.
set print symbol-filename -- Set printing of source filename and line number with <SYMBOL>.
set print symbol-loading -- Set printing of symbol loading messages.
set print thread-events -- Set printing of thread events (such as thread start and exit).
set print type -- Generic command for setting how types print.
set print type methods -- Set printing of methods defined in classes.
set print type nested-type-limit -- Set the number of recursive nested type definitions to print ("unlimited" or -1 to show all).
set print type typedefs -- Set printing of typedefs defined in classes.
set print union -- Set printing of unions interior to structures.
set print vtbl -- Set printing of C++ virtual function tables.
set prompt -- Set gdb's prompt.
set prompt-color -- Set prompt color
set python -- Prefix command for python preference settings.
set python print-stack -- Set mode for Python stack dump on error.
set radix -- Set default input and output number radices.
set range-stepping -- Enable or disable range stepping.
set record, set rec -- Set record options.
set record btrace -- Set record options.
set record btrace bts -- Set record btrace bts options.
set record btrace bts buffer-size -- Set the record/replay bts buffer size.
set record btrace cpu -- Set the cpu to be used for trace decode.
set record btrace cpu auto -- Automatically determine the cpu to be used for trace decode.
set record btrace cpu none -- Do not enable errata workarounds for trace decode.
set record btrace pt -- Set record btrace pt options.
set record btrace pt buffer-size -- Set the record/replay pt buffer size.
set record btrace replay-memory-access -- Set what memory accesses are allowed during replay.
set record full -- Set record options.
set record full insn-number-max, set record insn-number-max -- Set record/replay buffer limit.
set record full memory-query, set record memory-query -- Set whether query if PREC cannot record memory change of next instruction.
set record full stop-at-limit, set record stop-at-limit -- Set whether record/replay stops when record/replay buffer becomes full.
set record function-call-history-size -- Set number of function to print in "record function-call-history".
set record instruction-history-size -- Set number of instructions to print in "record instruction-history".
set remote -- Remote protocol specific variables.
set remote TracepointSource-packet -- Set use of remote protocol `TracepointSource' (TracepointSource) packet.
set remote Z-packet -- Set use of remote protocol `Z' packets.
set remote access-watchpoint-packet -- Set use of remote protocol `Z4' (access-watchpoint) packet.
set remote agent-packet -- Set use of remote protocol `QAgent' (agent) packet.
set remote allow-packet -- Set use of remote protocol `QAllow' (allow) packet.
set remote attach-packet -- Set use of remote protocol `vAttach' (attach) packet.
set remote binary-download-packet, set remote X-packet -- Set use of remote protocol `X' (binary-download) packet.
set remote breakpoint-commands-packet -- Set use of remote protocol `BreakpointCommands' (breakpoint-commands) packet.
set remote btrace-conf-bts-size-packet -- Set use of remote protocol `Qbtrace-conf:bts:size' (btrace-conf-bts-size) packet.
set remote btrace-conf-pt-size-packet -- Set use of remote protocol `Qbtrace-conf:pt:size' (btrace-conf-pt-size) packet.
set remote catch-syscalls-packet -- Set use of remote protocol `QCatchSyscalls' (catch-syscalls) packet.
set remote conditional-breakpoints-packet -- Set use of remote protocol `ConditionalBreakpoints' (conditional-breakpoints) packet.
set remote conditional-tracepoints-packet -- Set use of remote protocol `ConditionalTracepoints' (conditional-tracepoints) packet.
set remote ctrl-c-packet -- Set use of remote protocol `vCtrlC' (ctrl-c) packet.
set remote disable-btrace-packet -- Set use of remote protocol `Qbtrace:off' (disable-btrace) packet.
set remote disable-randomization-packet -- Set use of remote protocol `QDisableRandomization' (disable-randomization) packet.
set remote enable-btrace-bts-packet -- Set use of remote protocol `Qbtrace:bts' (enable-btrace-bts) packet.
set remote enable-btrace-pt-packet -- Set use of remote protocol `Qbtrace:pt' (enable-btrace-pt) packet.
set remote environment-hex-encoded-packet -- Set use of remote protocol `QEnvironmentHexEncoded' (environment-hex-encoded) packet.
set remote environment-reset-packet -- Set use of remote protocol `QEnvironmentReset' (environment-reset) packet.
set remote environment-unset-packet -- Set use of remote protocol `QEnvironmentUnset' (environment-unset) packet.
set remote exec-event-feature-packet -- Set use of remote protocol `exec-event-feature' (exec-event-feature) packet.
set remote exec-file -- Set the remote pathname for "run".
set remote fast-tracepoints-packet -- Set use of remote protocol `FastTracepoints' (fast-tracepoints) packet.
set remote fetch-register-packet, set remote p-packet -- Set use of remote protocol `p' (fetch-register) packet.
set remote fork-event-feature-packet -- Set use of remote protocol `fork-event-feature' (fork-event-feature) packet.
set remote get-thread-information-block-address-packet -- Set use of remote protocol `qGetTIBAddr' (get-thread-information-block-address) packet.
set remote get-thread-local-storage-address-packet -- Set use of remote protocol `qGetTLSAddr' (get-thread-local-storage-address) packet.
set remote hardware-breakpoint-limit -- Set the maximum number of target hardware breakpoints.
set remote hardware-breakpoint-packet -- Set use of remote protocol `Z1' (hardware-breakpoint) packet.
set remote hardware-watchpoint-length-limit -- Set the maximum length (in bytes) of a target hardware watchpoint.
set remote hardware-watchpoint-limit -- Set the maximum number of target hardware watchpoints.
set remote hostio-close-packet -- Set use of remote protocol `vFile:close' (hostio-close) packet.
set remote hostio-fstat-packet -- Set use of remote protocol `vFile:fstat' (hostio-fstat) packet.
set remote hostio-open-packet -- Set use of remote protocol `vFile:open' (hostio-open) packet.
set remote hostio-pread-packet -- Set use of remote protocol `vFile:pread' (hostio-pread) packet.
set remote hostio-pwrite-packet -- Set use of remote protocol `vFile:pwrite' (hostio-pwrite) packet.
set remote hostio-readlink-packet -- Set use of remote protocol `vFile:readlink' (hostio-readlink) packet.
set remote hostio-setfs-packet -- Set use of remote protocol `vFile:setfs' (hostio-setfs) packet.
set remote hostio-unlink-packet -- Set use of remote protocol `vFile:unlink' (hostio-unlink) packet.
set remote hwbreak-feature-packet -- Set use of remote protocol `hwbreak-feature' (hwbreak-feature) packet.
set remote install-in-trace-packet -- Set use of remote protocol `InstallInTrace' (install-in-trace) packet.
set remote interrupt-on-connect -- Set whether interrupt-sequence is sent to remote target when gdb connects to.
set remote interrupt-sequence -- Set interrupt sequence to remote target.
set remote kill-packet -- Set use of remote protocol `vKill' (kill) packet.
set remote library-info-packet -- Set use of remote protocol `qXfer:libraries:read' (library-info) packet.
set remote library-info-svr4-packet -- Set use of remote protocol `qXfer:libraries-svr4:read' (library-info-svr4) packet.
set remote memory-map-packet -- Set use of remote protocol `qXfer:memory-map:read' (memory-map) packet.
set remote memory-read-packet-size -- Set the maximum number of bytes per memory-read packet.
set remote memory-write-packet-size -- Set the maximum number of bytes per memory-write packet.
set remote multiprocess-feature-packet -- Set use of remote protocol `multiprocess-feature' (multiprocess-feature) packet.
set remote no-resumed-stop-reply-packet -- Set use of remote protocol `N stop reply' (no-resumed-stop-reply) packet.
set remote noack-packet -- Set use of remote protocol `QStartNoAckMode' (noack) packet.
set remote osdata-packet -- Set use of remote protocol `qXfer:osdata:read' (osdata) packet.
set remote pass-signals-packet -- Set use of remote protocol `QPassSignals' (pass-signals) packet.
set remote pid-to-exec-file-packet -- Set use of remote protocol `qXfer:exec-file:read' (pid-to-exec-file) packet.
set remote program-signals-packet -- Set use of remote protocol `QProgramSignals' (program-signals) packet.
set remote query-attached-packet -- Set use of remote protocol `qAttached' (query-attached) packet.
set remote read-aux-vector-packet -- Set use of remote protocol `qXfer:auxv:read' (read-aux-vector) packet.
set remote read-btrace-conf-packet -- Set use of remote protocol `qXfer:btrace-conf' (read-btrace-conf) packet.
set remote read-btrace-packet -- Set use of remote protocol `qXfer:btrace' (read-btrace) packet.
set remote read-fdpic-loadmap-packet -- Set use of remote protocol `qXfer:fdpic:read' (read-fdpic-loadmap) packet.
set remote read-sdata-object-packet -- Set use of remote protocol `qXfer:statictrace:read' (read-sdata-object) packet.
set remote read-siginfo-object-packet -- Set use of remote protocol `qXfer:siginfo:read' (read-siginfo-object) packet.
set remote read-watchpoint-packet -- Set use of remote protocol `Z3' (read-watchpoint) packet.
set remote reverse-continue-packet -- Set use of remote protocol `bc' (reverse-continue) packet.
set remote reverse-step-packet -- Set use of remote protocol `bs' (reverse-step) packet.
set remote run-packet -- Set use of remote protocol `vRun' (run) packet.
set remote search-memory-packet -- Set use of remote protocol `qSearch:memory' (search-memory) packet.
set remote set-register-packet, set remote P-packet -- Set use of remote protocol `P' (set-register) packet.
set remote set-working-dir-packet -- Set use of remote protocol `QSetWorkingDir' (set-working-dir) packet.
set remote software-breakpoint-packet -- Set use of remote protocol `Z0' (software-breakpoint) packet.
set remote startup-with-shell-packet -- Set use of remote protocol `QStartupWithShell' (startup-with-shell) packet.
set remote static-tracepoints-packet -- Set use of remote protocol `StaticTracepoints' (static-tracepoints) packet.
set remote supported-packets-packet -- Set use of remote protocol `qSupported' (supported-packets) packet.
set remote swbreak-feature-packet -- Set use of remote protocol `swbreak-feature' (swbreak-feature) packet.
set remote symbol-lookup-packet -- Set use of remote protocol `qSymbol' (symbol-lookup) packet.
set remote system-call-allowed -- Set if the host system(3) call is allowed for the target.
set remote target-features-packet -- Set use of remote protocol `qXfer:features:read' (target-features) packet.
set remote thread-events-packet -- Set use of remote protocol `QThreadEvents' (thread-events) packet.
set remote threads-packet -- Set use of remote protocol `qXfer:threads:read' (threads) packet.
set remote trace-buffer-size-packet -- Set use of remote protocol `QTBuffer:size' (trace-buffer-size) packet.
set remote trace-status-packet -- Set use of remote protocol `qTStatus' (trace-status) packet.
set remote traceframe-info-packet -- Set use of remote protocol `qXfer:traceframe-info:read' (traceframe-info) packet.
set remote unwind-info-block-packet -- Set use of remote protocol `qXfer:uib:read' (unwind-info-block) packet.
set remote verbose-resume-packet -- Set use of remote protocol `vCont' (verbose-resume) packet.
set remote verbose-resume-supported-packet -- Set use of remote protocol `vContSupported' (verbose-resume-supported) packet.
set remote vfork-event-feature-packet -- Set use of remote protocol `vfork-event-feature' (vfork-event-feature) packet.
set remote write-siginfo-object-packet -- Set use of remote protocol `qXfer:siginfo:write' (write-siginfo-object) packet.
set remote write-watchpoint-packet -- Set use of remote protocol `Z2' (write-watchpoint) packet.
set remoteaddresssize -- Set the maximum size of the address (in bits) in a memory packet.
set remotecache -- Set cache use for remote targets.
set remoteflow -- Set use of hardware flow control for remote serial I/O.
set remotelogbase -- Set numerical base for remote session logging.
set remotelogfile -- Set filename for remote session recording.
set remotetimeout -- Set timeout limit to wait for target to respond.
set remotewritesize -- Set the maximum number of bytes per memory write packet (deprecated).
set schedule-multiple -- Set mode for resuming threads of all processes.
set scheduler-locking -- Set mode for locking scheduler during execution.
set script-extension -- Set mode for script filename extension recognition.
set serial -- Set default serial/parallel port configuration.
set serial baud -- Set baud rate for remote serial I/O.
set serial parity -- Set parity for remote serial I/O.
set show-compact-regs -- Set whether to show a compact register view
set show-compact-regs-align -- Set the number of characters reserved for each register and value
set show-compact-regs-space -- Set the minimum number of characters separating each register
set show-flags -- Set whether to show flags registers
set show-retaddr-reg -- Set whether to show return address register
set solib-search-path -- Set the search path for loading non-absolute shared library symbol files.
set stack-cache -- Set cache use for stack access.
set startup-with-shell -- Set use of shell to start subprocesses.  The default is on.
set step-mode -- Set mode of the step operation.
set stop-on-solib-events -- Set stopping for shared library events.
set struct-convention -- Set the convention for returning small structs.
set style -- Style-specific settings.
set style address -- Address display styling.
set style address background -- Set the background color for this property.
set style address foreground -- Set the foreground color for this property.
set style address intensity -- Set the display intensity for this property.
set style enabled -- Set whether CLI styling is enabled.
set style filename -- Filename display styling.
set style filename background -- Set the background color for this property.
set style filename foreground -- Set the foreground color for this property.
set style filename intensity -- Set the display intensity for this property.
set style function -- Function name display styling.
set style function background -- Set the background color for this property.
set style function foreground -- Set the foreground color for this property.
set style function intensity -- Set the display intensity for this property.
set style highlight -- Highlight display styling.
set style highlight background -- Set the background color for this property.
set style highlight foreground -- Set the foreground color for this property.
set style highlight intensity -- Set the display intensity for this property.
set style metadata -- Metadata display styling.
set style metadata background -- Set the background color for this property.
set style metadata foreground -- Set the foreground color for this property.
set style metadata intensity -- Set the display intensity for this property.
set style sources -- Set whether source code styling is enabled.
set style title -- Title display styling.
set style title background -- Set the background color for this property.
set style title foreground -- Set the foreground color for this property.
set style title intensity -- Set the display intensity for this property.
set style tui-active-border -- TUI active border display styling.
set style tui-active-border background -- Set the background color for this property.
set style tui-active-border foreground -- Set the foreground color for this property.
set style tui-border -- TUI border display styling.
set style tui-border background -- Set the background color for this property.
set style tui-border foreground -- Set the foreground color for this property.
set style variable -- Variable name display styling.
set style variable background -- Set the background color for this property.
set style variable foreground -- Set the foreground color for this property.
set style variable intensity -- Set the display intensity for this property.
set substitute-path -- Add a substitution rule to rewrite the source directories.
set syntax-highlight -- Set Source code / assembly syntax highlight
set syntax-highlight-style -- Set Source code / assembly syntax highlight stylename of pygments module
set sysroot, set solib-absolute-prefix -- Set an alternate system root.
set target-charset -- Set the target character set.
set target-file-system-kind -- Set assumed file system kind for target reported file names.
set target-wide-charset -- Set the target wide character set.
set tcp -- TCP protocol specific variables.
set tcp auto-retry -- Set auto-retry on socket connect.
set tcp connect-timeout -- Set timeout limit in seconds for socket connection.
set tdesc -- Set target description specific variables.
set tdesc filename -- Set the file to read for an XML target description.
set telescope-lines -- Set number of lines to printed by the telescope command
set telescope-offset-color -- Set color of the telescope command (offset prefix)
set telescope-offset-delimiter -- Set offset delimiter of the telescope command
set telescope-offset-delimiter-color -- Set color of the telescope command (offset delimiter)
set telescope-offset-separator -- Set offset separator of the telescope command
set telescope-offset-separator-color -- Set color of the telescope command (offset separator)
set telescope-register-color -- Set color of the telescope command (register)
set telescope-repeating-marker -- Set repeating values marker of the telescope command
set telescope-repeating-marker-color -- Set color of the telescope command (repeating values marker)
set telescope-skip-repeating-val -- Set whether to skip repeating values of the telescope command
set telescope-skip-repeating-val-minimum -- Set minimum amount of repeated values before skipping lines
set trace-buffer-size -- Set requested size of trace buffer.
set trace-commands -- Set tracing of GDB CLI commands.
set trace-notes -- Set notes string to use for current and future trace runs.
set trace-stop-notes -- Set notes string to use for future tstop commands.
set trace-user -- Set the user name to use for current and future trace runs.
set trust-readonly-sections -- Set mode for reading from readonly sections.
set tui -- TUI configuration variables.
set tui active-border-mode -- Set the attribute mode to use for the active TUI window border.
set tui border-kind -- Set the kind of border for TUI windows.
set tui border-mode -- Set the attribute mode to use for the TUI window borders.
set tui compact-source -- Set whether the TUI source window is compact.
set tui tab-width -- Set the tab width, in characters, for the TUI.
set unwind-on-terminating-exception -- Set unwinding of stack if std::terminate is called while in call dummy.
set unwindonsignal -- Set unwinding of stack if a signal is received while in a call dummy.
set use-coredump-filter -- Set whether gcore should consider /proc/PID/coredump_filter.
set use-deprecated-index-sections -- Set whether to use deprecated gdb_index sections.
set variable, set var -- Evaluate expression EXP and assign result to variable VAR.
set varsize-limit -- Set the maximum number of bytes allowed in a variable-size object.
set verbose -- Set verbosity.
set watchdog -- Set watchdog timer.
set width -- Set number of characters where GDB should wrap lines of its output.
set write -- Set writing into executable and core files.
undisplay -- Cancel some expressions to be displayed when program stops.
whatis -- Print data type of expression EXP.
with -- Temporarily set SETTING to VALUE, run COMMAND, and restore SETTING.
x -- Examine memory: x/FMT ADDRESS.

Command class: files

add-symbol-file -- Load symbols from FILE, assuming FILE has been dynamically loaded.
add-symbol-file-from-memory -- Load the symbols out of memory from a dynamically loaded object file.
cd -- Set working directory to DIR for debugger.
core-file -- Use FILE as core dump for examining memory and registers.
directory -- Add directory DIR to beginning of search path for source files.
edit -- Edit specified file or function.
exec-file -- Use FILE as program for getting contents of pure memory.
file -- Use FILE as program to be debugged.
forward-search, fo -- Search for regular expression (see regex(3)) from last line listed.
generate-core-file, gcore -- Save a core file with the current state of the debugged process.
list, l -- List specified function or line.
load -- Dynamically load FILE into the running program.
nosharedlibrary -- Unload all shared object library symbols.
path -- Add directory DIR(s) to beginning of search path for object files.
remote -- Manipulate files on the remote system.
remote delete -- Delete a remote file.
remote get -- Copy a remote file to the local system.
remote put -- Copy a local file to the remote system.
remove-symbol-file -- Remove a symbol file added via the add-symbol-file command.
reverse-search, rev -- Search backward for regular expression (see regex(3)) from last line listed.
section -- Change the base address of section SECTION of the exec file to ADDR.
sharedlibrary -- Load shared object library symbols for files matching REGEXP.
symbol-file -- Load symbol table from executable file FILE.

Command class: internals

flushregs -- Force gdb to flush its register cache (maintainer command).
maintenance, mt -- Commands for use by GDB maintainers.
maintenance agent -- Translate an expression into remote agent bytecode for tracing.
maintenance agent-eval -- Translate an expression into remote agent bytecode for evaluation.
maintenance agent-printf -- Translate an expression into remote agent bytecode for evaluation and display the bytecodes.
maintenance btrace -- Branch tracing maintenance commands.
maintenance btrace clear -- Clears the branch tracing data.
maintenance btrace clear-packet-history -- Clears the branch tracing packet history.
maintenance btrace packet-history -- Print the raw branch tracing data.
maintenance check -- Commands for checking internal gdb state.
maintenance check libthread-db -- Run integrity checks on the current inferior's libthread_db.
maintenance check xml-descriptions -- Check equality of GDB target descriptions and XML created descriptions.
maintenance check-psymtabs -- Check consistency of currently expanded psymtabs versus symtabs.
maintenance check-symtabs -- Check consistency of currently expanded symtabs.
maintenance cplus, maintenance cp -- C++ maintenance commands.
maintenance cplus first_component -- Print the first class/namespace component of NAME.
maintenance demangler-warning -- Give GDB a demangler warning.
maintenance deprecate -- Deprecate a command (for testing purposes).
maintenance dump-me -- Get fatal error; make debugger dump its core.
maintenance expand-symtabs -- Expand symbol tables.
maintenance flush-symbol-cache -- Flush the symbol cache for each program space.
maintenance info, maintenance i -- Commands for showing internal info about the program being debugged.
maintenance info bfds -- List the BFDs that are currently open.
maintenance info breakpoints -- Status of all breakpoints, or breakpoint number NUMBER.
maintenance info btrace -- Info about branch tracing data.
maintenance info line-table -- List the contents of all line tables, from all symbol tables.
maintenance info program-spaces -- Info about currently known program spaces.
maintenance info psymtabs -- List the partial symbol tables for all object files.
maintenance info sections -- List the BFD sections of the exec and core files.
maintenance info selftests -- List the registered selftests.
maintenance info symtabs -- List the full symbol tables for all object files.
maintenance internal-error -- Give GDB an internal error.
maintenance internal-warning -- Give GDB an internal warning.
maintenance packet -- Send an arbitrary packet to a remote target.
maintenance print -- Maintenance command for printing GDB internal state.
maintenance print architecture -- Print the internal architecture configuration.
maintenance print c-tdesc -- Print the current target description as a C source file.
maintenance print cooked-registers -- Print the internal register configuration including cooked values.
maintenance print core-file-backed-mappings -- Print core file's file-backed mappings.
maintenance print dummy-frames -- Print the contents of the internal dummy-frame stack.
maintenance print msymbols -- Print dump of current minimal symbol definitions.
maintenance print objfiles -- Print dump of current object file definitions.
maintenance print psymbols -- Print dump of current partial symbol definitions.
maintenance print raw-registers -- Print the internal register configuration including raw values.
maintenance print reggroups -- Print the internal register group names.
maintenance print register-groups -- Print the internal register configuration including each register's group.
maintenance print registers -- Print the internal register configuration.
maintenance print remote-registers -- Print the internal register configuration including remote register number and g/G packets offset.
maintenance print statistics -- Print statistics about internal gdb state.
maintenance print symbol-cache -- Dump the symbol cache for each program space.
maintenance print symbol-cache-statistics -- Print symbol cache statistics for each program space.
maintenance print symbols -- Print dump of current symbol definitions.
maintenance print target-stack -- Print the name of each layer of the internal target stack.
maintenance print type -- Print a type chain for a given symbol.
maintenance print user-registers -- List the names of the current user registers.
maintenance print xml-tdesc -- Print the current target description as an XML file.
maintenance selftest -- Run gdb's unit tests.
maintenance set -- Set GDB internal variables used by the GDB maintainer.
maintenance set ada -- Set Ada maintenance-related variables.
maintenance set ada ignore-descriptive-types -- Set whether descriptive types generated by GNAT should be ignored.
maintenance set bfd-sharing -- Set whether gdb will share bfds that appear to be the same file.
maintenance set btrace -- Set branch tracing specific variables.
maintenance set btrace pt -- Set Intel Processor Trace specific variables.
maintenance set btrace pt skip-pad -- Set whether PAD packets should be skipped in the btrace packet history.
maintenance set catch-demangler-crashes -- Set whether to attempt to catch demangler crashes.
maintenance set check-libthread-db -- Set whether to check libthread_db at load time.
maintenance set demangler-warning -- Configure what GDB does when demangler-warning is detected.
maintenance set demangler-warning quit -- Set whether GDB should quit when an demangler-warning is detected.
maintenance set dwarf -- Set DWARF specific variables.
maintenance set dwarf always-disassemble -- Set whether `info address' always disassembles DWARF expressions.
maintenance set dwarf max-cache-age -- Set the upper bound on the age of cached DWARF compilation units.
maintenance set dwarf unwinders -- Set whether the DWARF stack frame unwinders are used.
maintenance set internal-error -- Configure what GDB does when internal-error is detected.
maintenance set internal-error corefile -- Set whether GDB should create a core file of GDB when internal-error is detected.
maintenance set internal-error quit -- Set whether GDB should quit when an internal-error is detected.
maintenance set internal-warning -- Configure what GDB does when internal-warning is detected.
maintenance set internal-warning corefile -- Set whether GDB should create a core file of GDB when internal-warning is detected.
maintenance set internal-warning quit -- Set whether GDB should quit when an internal-warning is detected.
maintenance set per-command -- Per-command statistics settings.
maintenance set per-command space -- Set whether to display per-command space usage.
maintenance set per-command symtab -- Set whether to display per-command symtab statistics.
maintenance set per-command time -- Set whether to display per-command execution time.
maintenance set profile -- Set internal profiling.
maintenance set show-debug-regs -- Set whether to show variables that mirror the x86 debug registers.
maintenance set symbol-cache-size -- Set the size of the symbol cache.
maintenance set target-async -- Set whether gdb controls the inferior in asynchronous mode.
maintenance set target-non-stop -- Set whether gdb always controls the inferior in non-stop mode.
maintenance set test-settings -- Set GDB internal variables used for set/show command infrastructure testing.
maintenance set test-settings auto-boolean -- command used for internal testing.
maintenance set test-settings boolean -- command used for internal testing.
maintenance set test-settings enum -- command used for internal testing.
maintenance set test-settings filename -- command used for internal testing.
maintenance set test-settings integer -- command used for internal testing.
maintenance set test-settings optional-filename -- command used for internal testing.
maintenance set test-settings string -- command used for internal testing.
maintenance set test-settings string-noescape -- command used for internal testing.
maintenance set test-settings uinteger -- command used for internal testing.
maintenance set test-settings zinteger -- command used for internal testing.
maintenance set test-settings zuinteger -- command used for internal testing.
maintenance set test-settings zuinteger-unlimited -- command used for internal testing.
maintenance set tui-resize-message -- Set TUI resize messaging.
maintenance set worker-threads -- Set the number of worker threads GDB can use.
maintenance show -- Show GDB internal variables used by the GDB maintainer.
maintenance show ada -- Show Ada maintenance-related variables.
maintenance show ada ignore-descriptive-types -- Show whether descriptive types generated by GNAT should be ignored.
maintenance show bfd-sharing -- Show whether gdb will share bfds that appear to be the same file.
maintenance show btrace -- Show branch tracing specific variables.
maintenance show btrace pt -- Show Intel Processor Trace specific variables.
maintenance show btrace pt skip-pad -- Show whether PAD packets should be skipped in the btrace packet history.
maintenance show catch-demangler-crashes -- Show whether to attempt to catch demangler crashes.
maintenance show check-libthread-db -- Show whether to check libthread_db at load time.
maintenance show demangler-warning -- Show what GDB does when demangler-warning is detected.
maintenance show demangler-warning quit -- Show whether GDB will quit when an demangler-warning is detected.
maintenance show dwarf -- Show DWARF specific variables.
maintenance show dwarf always-disassemble -- Show whether `info address' always disassembles DWARF expressions.
maintenance show dwarf max-cache-age -- Show the upper bound on the age of cached DWARF compilation units.
maintenance show dwarf unwinders -- Show whether the DWARF stack frame unwinders are used.
maintenance show internal-error -- Show what GDB does when internal-error is detected.
maintenance show internal-error corefile -- Show whether GDB will create a core file of GDB when internal-error is detected.
maintenance show internal-error quit -- Show whether GDB will quit when an internal-error is detected.
maintenance show internal-warning -- Show what GDB does when internal-warning is detected.
maintenance show internal-warning corefile -- Show whether GDB will create a core file of GDB when internal-warning is detected.
maintenance show internal-warning quit -- Show whether GDB will quit when an internal-warning is detected.
maintenance show per-command -- Show per-command statistics settings.
maintenance show per-command space -- Show whether to display per-command space usage.
maintenance show per-command symtab -- Show whether to display per-command symtab statistics.
maintenance show per-command time -- Show whether to display per-command execution time.
maintenance show profile -- Show internal profiling.
maintenance show show-debug-regs -- Show whether to show variables that mirror the x86 debug registers.
maintenance show symbol-cache-size -- Show the size of the symbol cache.
maintenance show target-async -- Show whether gdb controls the inferior in asynchronous mode.
maintenance show target-non-stop -- Show whether gdb always controls the inferior in non-stop mode.
maintenance show test-options-completion-result -- Show maintenance test-options completion result.
maintenance show test-settings -- Show GDB internal variables used for set/show command infrastructure testing.
maintenance show test-settings auto-boolean -- command used for internal testing.
maintenance show test-settings boolean -- command used for internal testing.
maintenance show test-settings enum -- command used for internal testing.
maintenance show test-settings filename -- command used for internal testing.
maintenance show test-settings integer -- command used for internal testing.
maintenance show test-settings optional-filename -- command used for internal testing.
maintenance show test-settings string -- command used for internal testing.
maintenance show test-settings string-noescape -- command used for internal testing.
maintenance show test-settings uinteger -- command used for internal testing.
maintenance show test-settings zinteger -- command used for internal testing.
maintenance show test-settings zuinteger -- command used for internal testing.
maintenance show test-settings zuinteger-unlimited -- command used for internal testing.
maintenance show tui-resize-message -- Show TUI resize messaging.
maintenance show worker-threads -- Show the number of worker threads GDB can use.
maintenance space -- Set the display of space usage.
maintenance test-options -- Generic command for testing the options infrastructure.
maintenance test-options require-delimiter -- Command used for testing options processing.
maintenance test-options unknown-is-error -- Command used for testing options processing.
maintenance test-options unknown-is-operand -- Command used for testing options processing.
maintenance time -- Set the display of time usage.
maintenance translate-address -- Translate a section name and address to a symbol.
maintenance undeprecate -- Undeprecate a command (for testing purposes).
maintenance with -- Like "with", but works with "maintenance set" variables.

Command class: obscure

checkpoint -- Fork a duplicate process (experimental).
compare-sections -- Compare section data on target to the exec file.
compile, expression -- Command to compile source code and inject it into the inferior.
compile code -- Compile, inject, and execute code.
compile file -- Evaluate a file containing source code.
compile print -- Evaluate EXPR by using the compiler and print result.
complete -- List the completions for the rest of the line as a command.
guile, gu -- Evaluate a Guile expression.
guile-repl, gr -- Start a Guile interactive prompt.
monitor -- Send a command to the remote monitor (remote targets only).
python, py -- Evaluate a Python command.
python-interactive, pi -- Start an interactive Python prompt.
record, rec -- Start recording.
record btrace, record b -- Start branch trace recording.
record btrace bts, record bts -- Start branch trace recording in Branch Trace Store (BTS) format.
record btrace pt, record pt -- Start branch trace recording in Intel Processor Trace format.
record delete, record del, record d -- Delete the rest of execution log and start recording it anew.
record full -- Start full execution recording.
record full restore, record restore -- Restore the execution log from a file.
record function-call-history -- Prints the execution history at function granularity.
record goto -- Restore the program to its state at instruction number N.
record goto begin, record goto start -- Go to the beginning of the execution log.
record goto end -- Go to the end of the execution log.
record instruction-history -- Print disassembled instructions stored in the execution log.
record save -- Save the execution log to a file.
record stop, record s -- Stop the record/replay target.
restart -- Restore program context from a checkpoint.
stop -- There is no `stop' command, but you can set a hook on `stop'.

Command class: running

advance -- Continue the program up to the given location (same form as args for break command).
attach -- Attach to a process or file outside of GDB.
continue, fg, c -- Continue program being debugged, after signal or breakpoint.
detach -- Detach a process or file previously attached.
detach checkpoint -- Detach from a checkpoint (experimental).
detach inferiors -- Detach from inferior ID (or list of IDS).
disconnect -- Disconnect from a target.
finish, fin -- Execute until selected stack frame returns.
handle -- Specify how to handle signals.
inferior -- Use this command to switch between inferiors.
interrupt -- Interrupt the execution of the debugged program.
jump -- Continue program being debugged at specified line or address.
kill -- Kill execution of program being debugged.
kill inferiors -- Kill inferior ID (or list of IDs).
next, n -- Step program, proceeding through subroutine calls.
nexti, ni -- Step one instruction, but proceed through subroutine calls.
queue-signal -- Queue a signal to be delivered to the current thread when it is resumed.
reverse-continue, rc -- Continue program being debugged but run it in reverse.
reverse-finish -- Execute backward until just before selected stack frame is called.
reverse-next, rn -- Step program backward, proceeding through subroutine calls.
reverse-nexti, rni -- Step backward one instruction, but proceed through called subroutines.
reverse-step, rs -- Step program backward until it reaches the beginning of another source line.
reverse-stepi, rsi -- Step backward exactly one instruction.
run, r -- Start debugged program.
signal -- Continue program with the specified signal.
starti -- Start the debugged program stopping at the first instruction.
step, s -- Step program until it reaches a different source line.
stepi, si -- Step one instruction exactly.
taas -- Apply a command to all threads (ignoring errors and empty output).
target -- Connect to a target machine or process.
target core -- Use a core file as a target.
target ctf -- (Use a CTF directory as a target.
target exec -- Use an executable file as a target.
target extended-remote -- Use a remote computer via a serial line, using a gdb-specific protocol.
target native -- Native process (started by the "run" command).
target record-btrace -- Collect control-flow trace and provide the execution history.
target record-core -- Log program while executing and replay execution from log.
target record-full -- Log program while executing and replay execution from log.
target remote -- Use a remote computer via a serial line, using a gdb-specific protocol.
target tfile -- Use a trace file as a target.
task -- Use this command to switch between Ada tasks.
tfaas -- Apply a command to all frames of all threads (ignoring errors and empty output).
thread, t -- Use this command to switch between threads.
thread apply -- Apply a command to a list of threads.
thread apply all -- Apply a command to all threads.
thread find -- Find threads that match a regular expression.
thread name -- Set the current thread's name.
until -- Execute until past the current line or past a LOCATION.

Command class: status

info, inf, i -- Generic command for showing things about the program being debugged.
info address -- Describe where symbol SYM is stored.
info all-registers -- List of all registers and their contents, for selected stack frame.
info args -- All argument variables of current stack frame or those matching REGEXPs.
info auto-load -- Print current status of auto-loaded files.
info auto-load gdb-scripts -- Print the list of automatically loaded sequences of commands.
info auto-load libthread-db -- Print the list of loaded inferior specific libthread_db.
info auto-load local-gdbinit -- Print whether current directory .gdbinit file has been loaded.
info auto-load python-scripts -- Print the list of automatically loaded Python scripts.
info auxv -- Display the inferior's auxiliary vector.
info bookmarks -- Status of user-settable bookmarks.
info breakpoints, info b -- Status of specified breakpoints (all user-settable breakpoints if no argument).
info checkpoints -- IDs of currently known checkpoints.
info classes -- All Objective-C classes, or those matching REGEXP.
info common -- Print out the values contained in a Fortran COMMON block.
info connections -- Target connections in use.
info copying -- Conditions for redistributing copies of GDB.
info dcache -- Print information on the dcache performance.
info display -- Expressions to display when program stops, with code numbers.
info exceptions -- List all Ada exception names.
info extensions -- All filename extensions associated with a source language.
info files -- Names of targets and files being debugged.
info float -- Print the status of the floating point unit.
info frame, info f -- All about the selected stack frame.
info frame address -- Print information about a stack frame selected by stack address.
info frame function -- Print information about a stack frame selected by function name.
info frame level -- Print information about a stack frame selected by level.
info frame view -- Print information about a stack frame outside the current backtrace.
info frame-filter -- List all registered Python frame-filters.
info functions -- All function names or those matching REGEXPs.
info guile, info gu -- Prefix command for Guile info displays.
info inferiors -- Print a list of inferiors being managed.
info line -- Core addresses of the code for a source line.
info locals -- All local variables of current stack frame or those matching REGEXPs.
info macro -- Show the definition of MACRO, and it's source location.
info macros -- Show the definitions of all macros at LINESPEC, or the current source location.
info mem -- Memory region attributes.
info module -- Print information about modules.
info module functions -- Display functions arranged by modules.
info module variables -- Display variables arranged by modules.
info modules -- All module names, or those matching REGEXP.
info os -- Show OS data ARG.
info pretty-printer -- GDB command to list all registered pretty-printers.
info probes -- Show available static probes.
info probes all -- Show information about all type of probes.
info probes dtrace -- Show information about DTrace static probes.
info probes stap -- Show information about SystemTap static probes.
info proc -- Show additional information about a process.
info proc all -- List all available info about the specified process.
info proc cmdline -- List command line arguments of the specified process.
info proc cwd -- List current working directory of the specified process.
info proc exe -- List absolute filename for executable of the specified process.
info proc files -- List files opened by the specified process.
info proc mappings -- List memory regions mapped by the specified process.
info proc stat -- List process info from /proc/PID/stat.
info proc status -- List process info from /proc/PID/status.
info program -- Execution status of the program.
info record, info rec -- Info record options.
info registers, info r -- List of integer registers and their contents, for selected stack frame.
info scope -- List the variables local to a scope.
info selectors -- All Objective-C selectors, or those matching REGEXP.
info sharedlibrary, info dll -- Status of loaded shared object libraries.
info signals, info handle -- What debugger does when program gets various signals.
info skip -- Display the status of skips.
info source -- Information about the current source file.
info sources -- All source files in the program or those matching REGEXP.
info stack, info s -- Backtrace of the stack, or innermost COUNT frames.
info static-tracepoint-markers -- List target static tracepoints markers.
info symbol -- Describe what symbol is at location ADDR.
info target -- Names of targets and files being debugged.
info tasks -- Provide information about all known Ada tasks.
info terminal -- Print inferior's saved terminal status.
info threads -- Display currently known threads.
info tracepoints, info tp -- Status of specified tracepoints (all tracepoints if no argument).
info tvariables -- Status of trace state variables and their values.
info type-printers -- GDB command to list all registered type-printers.
info types -- All type names, or those matching REGEXP.
info unwinder -- GDB command to list unwinders.
info variables -- All global and static variable names or those matching REGEXPs.
info vector -- Print the status of the vector unit.
info vtbl -- Show the virtual function table for a C++ object.
info warranty -- Various kinds of warranty you do not have.
info watchpoints -- Status of specified watchpoints (all watchpoints if no argument).
info win -- List of all displayed windows.
info xmethod -- GDB command to list registered xmethod matchers.
macro -- Prefix for commands dealing with C preprocessor macros.
macro define -- Define a new C/C++ preprocessor macro.
macro expand, macro exp -- Fully expand any C/C++ preprocessor macro invocations in EXPRESSION.
macro expand-once, macro exp1 -- Expand C/C++ preprocessor macro invocations appearing directly in EXPRESSION.
macro list -- List all the macros defined using the `macro define' command.
macro undef -- Remove the definition of the C/C++ preprocessor macro with the given name.
show, info set -- Generic command for showing things about the debugger.
show ada -- Generic command for showing Ada-specific settings.
show ada print-signatures -- Show whether the output of formal and return types for functions in the overloads selection menu is activated.
show ada trust-PAD-over-XVS -- Show whether an optimization trusting PAD types over XVS types is activated.
show agent -- Show debugger's willingness to use agent as a helper.
show annotate -- Show annotation_level.
show architecture -- Show architecture of target.
show args -- Show argument list to give program being debugged when it is started.
show auto-connect-native-target -- Show whether GDB may automatically connect to the native target.
show auto-load -- Show auto-loading specific settings.
show auto-load gdb-scripts -- Show whether auto-loading of canned sequences of commands scripts is enabled.
show auto-load libthread-db -- Show whether auto-loading inferior specific libthread_db is enabled.
show auto-load local-gdbinit -- Show whether auto-loading .gdbinit script in current directory is enabled.
show auto-load python-scripts -- Show the debugger's behaviour regarding auto-loaded Python scripts.
show auto-load safe-path -- Show the list of files and directories that are safe for auto-loading.
show auto-load scripts-directory -- Show the list of directories from which to load auto-loaded scripts.
show auto-save-search -- automatically pass --save to "search" command:
show auto-solib-add -- Show autoloading of shared library symbols.
show backtrace -- Show backtrace specific variables.
show backtrace limit -- Show the upper bound on the number of backtrace levels.
show backtrace past-entry -- Show whether backtraces should continue past the entry point of a program.
show backtrace past-main -- Show whether backtraces should continue past "main".
show backtrace-address-color -- color for backtrace (address):
show backtrace-frame-label -- frame number label for backtrace:
show backtrace-frame-label-color -- color for backtrace (frame label):
show backtrace-prefix -- prefix for current backtrace label:
show backtrace-prefix-color -- color for prefix of current backtrace label:
show backtrace-symbol-color -- color for backtrace (symbol):
show banner-color -- color for banner line:
show banner-separator -- repeated banner separator character:
show banner-title-color -- color for banner title:
show banner-title-position -- banner title position:
show banner-title-surrounding-left -- banner title surrounding char (left side):
show banner-title-surrounding-right -- banner title surrounding char (right side):
show basenames-may-differ -- Show whether a source file may have multiple base names.
show breakpoint -- Breakpoint specific settings.
show breakpoint always-inserted -- Show mode for inserting breakpoints.
show breakpoint auto-hw -- Show automatic usage of hardware breakpoints.
show breakpoint condition-evaluation -- Show mode of breakpoint condition evaluation.
show breakpoint pending -- Show debugger's behavior regarding pending breakpoints.
show can-use-hw-watchpoints -- Show debugger's willingness to use watchpoint hardware.
show case-sensitive -- Show case sensitivity in name search (on/off/auto).
show chain-arrow-color -- color of chain formatting (arrow):
show chain-arrow-left -- left arrow of chain formatting:
show chain-arrow-right -- right arrow of chain formatting:
show chain-contiguous-marker -- contiguous marker of chain formatting:
show chain-contiguous-marker-color -- color of chain formatting (contiguous marker):
show charset -- Show the host and target character sets.
show check, show ch, show c -- Show the status of the type/range checker.
show check range -- Show range checking (on/warn/off/auto).
show check type -- Show strict type checking.
show circular-trace-buffer -- Show target's use of circular trace buffer.
show code-cache -- Show cache use for code segment access.
show code-prefix -- prefix marker for 'context code' command:
show code-prefix-color -- color for 'context code' command (prefix marker):
show coerce-float-to-double -- Show coercion of floats to doubles when calling functions.
show commands -- Show the history of commands you typed.
show comment-color -- color for comment:
show compile-args -- Show compile command GCC command-line arguments.
show compile-gcc -- Show compile command GCC driver filename.
show complaints -- Show max number of complaints about incorrect symbols.
show configuration -- Show how GDB was configured at build time.
show confirm -- Show whether to confirm potentially dangerous operations.
show context-backtrace-lines -- number of lines to print in the backtrace context:
show context-clear-screen -- whether to clear the screen before printing the context:
show context-code-lines -- number of additional lines to print in the code context:
show context-flag-bracket-color -- color for flags register (bracket):
show context-flag-changed-color -- color for flags register (flag changed):
show context-flag-set-color -- color for flags register (flag set):
show context-flag-unset-color -- color for flags register (flag unset):
show context-flag-value-color -- color for flags register (register value):
show context-ghidra -- when to try to decompile the current function with ghidra (slow and requires radare2/r2pipe) (valid values: always, never, if-no-source):
show context-output -- where pwndbg should output ("stdout" or file/tty).:
show context-register-changed-color -- color for registers label (change marker):
show context-register-changed-marker -- change marker for registers label:
show context-register-color -- color for registers label:
show context-sections -- which context sections are displayed (controls order):
show context-source-code-lines -- number of source code lines to print by the context command:
show context-stack-lines -- number of lines to print in the stack context:
show convenience, show conv -- Debugger convenience ("$foo") variables and functions.
show copying -- Conditions for redistributing copies of GDB.
show cp-abi -- Show the ABI used for inspecting C++ objects.
show cwd -- Show the current working directory that is used when the inferior is started.
show data-directory -- Show GDB's data directory.
show dcache -- Show dcachesettings.
show dcache line-size -- Show dcache line size.
show dcache size -- Show number of dcache lines.
show debug -- Generic command for showing gdb debugging flags.
show debug arch -- Show architecture debugging.
show debug auto-load -- Show auto-load verifications debugging.
show debug bfd-cache -- Show bfd cache debugging.
show debug check-physname -- Show cross-checking of "physname" code against demangler.
show debug coff-pe-read -- Show coff PE read debugging.
show debug compile -- Show compile command debugging.
show debug compile-cplus-scopes -- Show debugging of C++ compile scopes.
show debug compile-cplus-types -- Show debugging of C++ compile type conversion.
show debug displaced -- Show displaced stepping debugging.
show debug dwarf-die -- Show debugging of the DWARF DIE reader.
show debug dwarf-line -- Show debugging of the dwarf line reader.
show debug dwarf-read -- Show debugging of the DWARF reader.
show debug entry-values -- Show entry values and tail call frames debugging.
show debug expression -- Show expression debugging.
show debug frame -- Show frame debugging.
show debug index-cache -- Show display of index-cache debug messages.
show debug infrun -- Show inferior debugging.
show debug jit -- Show JIT debugging.
show debug libthread-db -- Show libthread-db debugging.
show debug lin-lwp -- Show debugging of GNU/Linux lwp module.
show debug linux-namespaces -- Show debugging of GNU/Linux namespaces module.
show debug notification -- Show debugging of async remote notification.
show debug observer -- Show observer debugging.
show debug overload -- Show debugging of C++ overloading.
show debug parser -- Show parser debugging.
show debug py-unwind -- Show Python unwinder debugging.
show debug record -- Show debugging of record/replay feature.
show debug remote -- Show debugging of remote protocol.
show debug remote-packet-max-chars -- Show the maximum number of characters to display for each remote packet.
show debug separate-debug-file -- Show printing of separate debug info file search debug.
show debug serial -- Show serial debugging.
show debug skip -- Show whether the debug output about skipping files and functions is printed.
show debug stap-expression -- Show SystemTap expression debugging.
show debug symbol-lookup -- Show debugging of symbol lookup.
show debug symfile -- Show debugging of the symfile functions.
show debug symtab-create -- Show debugging of symbol table creation.
show debug target -- Show target debugging.
show debug timestamp -- Show timestamping of debugging messages.
show debug varobj -- Show varobj debugging.
show debug xml -- Show XML parser debugging.
show debug-events -- display internal event debugging info:
show debug-file-directory -- Show the directories where separate debug symbols are searched for.
show default-collect -- Show the list of expressions to collect by default.
show demangle-style -- Show the current C++ demangling style.
show dereference-limit -- max number of pointers to dereference in a chain:
show detach-on-fork -- Show whether gdb will detach the child of a fork.
show directories -- Show the search path for finding source files.
show disable-colors -- whether to color the output or not:
show disable-randomization -- Show disabling of debuggee's virtual address space randomization.
show disasm-branch-color -- color for disasm (branch/call instruction):
show disassemble-next-line -- Show whether to disassemble next source line or insn when execution stops.
show disassembler-options -- Show the disassembler options.
show disassembly-flavor -- Show the disassembly flavor.
show disconnected-dprintf -- Show whether dprintf continues after GDB disconnects.
show disconnected-tracing -- Show whether tracing continues after GDB disconnects.
show displaced-stepping -- Show debugger's willingness to use displaced stepping.
show dprintf-channel -- Show the channel to use for dynamic printf.
show dprintf-function -- Show the function to use for dynamic printf.
show dprintf-style -- Show the style of usage for dynamic printf.
show dump-excluded-mappings -- Show whether gcore should dump mappings marked with the VM_DONTDUMP flag.
show editing -- Show editing of command lines as they are typed.
show emulate --
show endian -- Show endianness of target.
show enhance-comment-color -- color of value enhance (comment):
show enhance-integer-value-color -- color of value enhance (integer):
show enhance-string-value-color -- color of value enhance (string):
show enhance-unknown-color -- color of value enhance (unknown value):
show environment -- The environment to give the program, or one variable's value.
show exception-debugger -- whether to debug exceptions raised in Pwndbg commands:
show exception-verbose -- whether to print a full stacktrace for exceptions raised in Pwndbg commands:
show exec-direction -- Show direction of execution (forward/reverse).
show exec-done-display -- Show notification of completion for asynchronous execution commands.
show exec-file-mismatch -- Show exec-file-mismatch handling (ask|warn|off).
show exec-wrapper -- Show the wrapper for running programs.
show extended-prompt -- Show the extended prompt.
show extension-language -- Show mapping between filename extension and source language.
show filename-display -- Show how to display filenames.
show follow-exec-mode -- Show debugger response to a program call of exec.
show follow-fork-mode -- Show debugger response to a program call of fork or vfork.
show frame-filter -- Prefix command for 'show' frame-filter related operations.
show frame-filter priority -- GDB command to show the priority of the specified frame-filter.
show gnutarget -- Show the current BFD target.
show guile, show gu -- Prefix command for Guile preference settings.
show guile print-stack -- Show the mode of Guile exception printing on error.
show heap-dereference-limit -- number of bins to dereference:
show height -- Show number of lines in a page for GDB output pagination.
show hexdump-address-color -- color for hexdump command (address label):
show hexdump-ascii-block-separator -- block separator char of the hexdump command:
show hexdump-byte-separator -- separator of single bytes in hexdump (does NOT affect group separator):
show hexdump-bytes -- number of bytes printed by hexdump command:
show hexdump-colorize-ascii -- whether to colorize the hexdump command ascii section:
show hexdump-group-use-big-endian -- Use big-endian within each group of bytes. Only applies to raw bytes, not the ASCII part. See also hexdump-highlight-group-lsb.:
show hexdump-group-width -- number of bytes grouped in hexdump command (If -1, the architecture's pointer size is used):
show hexdump-highlight-group-lsb -- highlight LSB of each group. Applies only if hexdump-adjust-group-endianess actually changes byte order.:
show hexdump-normal-color -- color for hexdump command (normal bytes):
show hexdump-offset-color -- color for hexdump command (offset label):
show hexdump-printable-color -- color for hexdump command (printable characters):
show hexdump-separator-color -- color for hexdump command (group separator):
show hexdump-special-color -- color for hexdump command (special bytes):
show hexdump-width -- line width of hexdump command:
show hexdump-zero-color -- color for hexdump command (zero bytes):
show highlight-color -- color added to highlights like source/pc:
show highlight-pc -- whether to highlight the current instruction:
show highlight-source -- whether to highlight the closest source line:
show history -- Generic command for showing command history parameters.
show history expansion -- Show history expansion on command input.
show history filename -- Show the filename in which to record the command history.
show history remove-duplicates -- Show how far back in history to look for and remove duplicate entries.
show history save -- Show saving of the history record on exit.
show history size -- Show the size of the command history.
show host-charset -- Show the host character set.
show ida-enabled -- whether to enable ida integration:
show ida-rpc-host -- ida xmlrpc server address:
show ida-rpc-port -- ida xmlrpc server port:
show ida-timeout -- time to wait for ida xmlrpc in seconds:
show index-cache -- Show index-cache options.
show index-cache directory -- Show the directory of the index cache.
show index-cache stats -- Show some stats about the index cache.
show inferior-tty -- Show terminal for future runs of program being debugged.
show input-radix -- Show default input radix for entering numbers.
show interactive-mode -- Show whether GDB's standard input is a terminal.
show language -- Show the current source language.
show left-pad-disasm -- whether to left-pad disassembly:
show libthread-db-search-path -- Show the current search path or libthread_db.
show listsize -- Show number of source lines gdb will list by default.
show logging -- Show logging options.
show logging debugredirect -- Show the logging debug output mode.
show logging file -- Show the current logfile.
show logging overwrite -- Show whether logging overwrites or appends to the log file.
show logging redirect -- Show the logging output mode.
show max-completions -- Show maximum number of completion candidates.
show max-user-call-depth -- Show the max call depth for non-python/scheme user-defined commands.
show max-value-size -- Show maximum sized value gdb will load from the inferior.
show may-call-functions -- Show permission to call functions in the program.
show may-insert-breakpoints -- Show permission to insert breakpoints in the target.
show may-insert-fast-tracepoints -- Show permission to insert fast tracepoints in the target.
show may-insert-tracepoints -- Show permission to insert tracepoints in the target.
show may-interrupt -- Show permission to interrupt or signal the target.
show may-write-memory -- Show permission to write into target memory.
show may-write-registers -- Show permission to write into registers.
show mem -- Memory regions settings.
show mem  inaccessible-by-default -- Show handling of unknown memory regions.
show memory-code-color -- color for executable memory:
show memory-data-color -- color for all other writable memory:
show memory-heap-color -- color for heap memory:
show memory-rodata-color -- color for all read only memory:
show memory-rwx-color -- color added to all RWX memory:
show memory-stack-color -- color for stack memory:
show message-breakpoint-color -- color of breakpoint messages:
show message-error-color -- color of error messages:
show message-exit-color -- color of exit messages:
show message-hint-color -- color of hint and marker messages:
show message-notice-color -- color of notice messages:
show message-signal-color -- color of signal messages:
show message-status-off-color -- color of off status messages:
show message-status-on-color -- color of on status messages:
show message-success-color -- color of success messages:
show message-system-color -- color of system messages:
show message-warning-color -- color of warning messages:
show mi-async, show target-async -- Show whether MI asynchronous mode is enabled.
show mpx -- Show Intel Memory Protection Extensions specific variables.
show mpx bound -- Show the memory bounds for a given array/pointer storage in the bound table.
show multiple-symbols -- Show how the debugger handles ambiguities in expressions.
show nearpc-address-color -- color for nearpc command (address):
show nearpc-argument-color -- color for nearpc command (target argument):
show nearpc-branch-marker -- branch marker line for nearpc command:
show nearpc-branch-marker-color -- color for nearpc command (branch marker line):
show nearpc-branch-marker-contiguous -- contiguous branch marker line for nearpc command:
show nearpc-ida-anterior-color -- color for nearpc command (IDA anterior):
show nearpc-lines -- number of additional lines to print for the nearpc command:
show nearpc-prefix -- prefix marker for nearpc command:
show nearpc-prefix-color -- color for nearpc command (prefix marker):
show nearpc-show-args -- show call arguments below instruction:
show nearpc-symbol-color -- color for nearpc command (symbol):
show nearpc-syscall-name-color -- color for nearpc command (resolved syscall name):
show non-stop -- Show whether gdb controls the inferior in non-stop mode.
show observer -- Show whether gdb controls the inferior in observer mode.
show opaque-type-resolution -- Show resolution of opaque struct/class/union types (if set before loading symbols).
show osabi -- Show OS ABI of target.
show output-radix -- Show default output radix for printing of values.
show overload-resolution -- Show overload resolution in evaluating C++ functions.
show pagination -- Show state of GDB output pagination.
show paths -- Current search path for finding object files.
show print, show pr, show p -- Generic command for showing print settings.
show print address -- Show printing of addresses.
show print array -- Show pretty formatting of arrays.
show print array-indexes -- Show printing of array indexes.
show print asm-demangle -- Show demangling of C++/ObjC names in disassembly listings.
show print demangle -- Show demangling of encoded C++/ObjC names when displaying symbols.
show print elements -- Show limit on string chars or array elements to print.
show print entry-values -- Show printing of function arguments at function entry.
show print finish -- Show whether `finish' prints the return value.
show print frame-arguments -- Show printing of non-scalar frame arguments.
show print frame-info -- Show printing of frame information.
show print inferior-events -- Show printing of inferior events (such as inferior start and exit).
show print max-depth -- Show maximum print depth for nested structures, unions, and arrays.
show print max-symbolic-offset -- Show the largest offset that will be printed in <SYMBOL+1234> form.
show print null-stop -- Show printing of char arrays to stop at first null char.
show print object -- Show printing of C++ virtual function tables.
show print pascal_static-members -- Show printing of pascal static members.
show print pretty -- Show pretty formatting of structures.
show print raw-frame-arguments -- Show whether to print frame arguments in raw form.
show print raw-values -- Show whether to print values in raw form.
show print repeats -- Show threshold for repeated print elements.
show print sevenbit-strings -- Show printing of 8-bit characters in strings as \nnn.
show print static-members -- Show printing of C++ static members.
show print symbol -- Show printing of symbol names when printing pointers.
show print symbol-filename -- Show printing of source filename and line number with <SYMBOL>.
show print symbol-loading -- Show printing of symbol loading messages.
show print thread-events -- Show printing of thread events (such as thread start and exit).
show print type -- Generic command for showing type-printing settings.
show print type methods -- Show printing of methods defined in classes.
show print type nested-type-limit -- Show the number of recursive nested type definitions to print.
show print type typedefs -- Show printing of typedefs defined in classes.
show print union -- Show printing of unions interior to structures.
show print vtbl -- Show printing of C++ virtual function tables.
show prompt -- Show gdb's prompt.
show prompt-color -- prompt color:
show python -- Prefix command for python preference settings.
show python print-stack -- Show the mode of Python stack printing on error.
show radix -- Show the default input and output number radices.
show range-stepping -- Show whether target-assisted range stepping is enabled.
show record, show rec -- Show record options.
show record btrace -- Show record options.
show record btrace bts -- Show record btrace bts options.
show record btrace bts buffer-size -- Show the record/replay bts buffer size.
show record btrace cpu -- Show the cpu to be used for trace decode.
show record btrace pt -- Show record btrace pt options.
show record btrace pt buffer-size -- Show the record/replay pt buffer size.
show record btrace replay-memory-access -- Show what memory accesses are allowed during replay.
show record full -- Show record options.
show record full insn-number-max, show record insn-number-max -- Show record/replay buffer limit.
show record full memory-query, show record memory-query -- Show whether query if PREC cannot record memory change of next instruction.
show record full stop-at-limit, show record stop-at-limit -- Show whether record/replay stops when record/replay buffer becomes full.
show record function-call-history-size -- Show number of functions to print in "record function-call-history".
show record instruction-history-size -- Show number of instructions to print in "record instruction-history".
show remote -- Remote protocol specific variables.
show remote TracepointSource-packet -- Show current use of remote protocol `TracepointSource' (TracepointSource) packet.
show remote Z-packet -- Show use of remote protocol `Z' packets.
show remote access-watchpoint-packet -- Show current use of remote protocol `Z4' (access-watchpoint) packet.
show remote agent-packet -- Show current use of remote protocol `QAgent' (agent) packet.
show remote allow-packet -- Show current use of remote protocol `QAllow' (allow) packet.
show remote attach-packet -- Show current use of remote protocol `vAttach' (attach) packet.
show remote binary-download-packet, show remote X-packet -- Show current use of remote protocol `X' (binary-download) packet.
show remote breakpoint-commands-packet -- Show current use of remote protocol `BreakpointCommands' (breakpoint-commands) packet.
show remote btrace-conf-bts-size-packet -- Show current use of remote protocol `Qbtrace-conf:bts:size' (btrace-conf-bts-size) packet.
show remote btrace-conf-pt-size-packet -- Show current use of remote protocol `Qbtrace-conf:pt:size' (btrace-conf-pt-size) packet.
show remote catch-syscalls-packet -- Show current use of remote protocol `QCatchSyscalls' (catch-syscalls) packet.
show remote conditional-breakpoints-packet -- Show current use of remote protocol `ConditionalBreakpoints' (conditional-breakpoints) packet.
show remote conditional-tracepoints-packet -- Show current use of remote protocol `ConditionalTracepoints' (conditional-tracepoints) packet.
show remote ctrl-c-packet -- Show current use of remote protocol `vCtrlC' (ctrl-c) packet.
show remote disable-btrace-packet -- Show current use of remote protocol `Qbtrace:off' (disable-btrace) packet.
show remote disable-randomization-packet -- Show current use of remote protocol `QDisableRandomization' (disable-randomization) packet.
show remote enable-btrace-bts-packet -- Show current use of remote protocol `Qbtrace:bts' (enable-btrace-bts) packet.
show remote enable-btrace-pt-packet -- Show current use of remote protocol `Qbtrace:pt' (enable-btrace-pt) packet.
show remote environment-hex-encoded-packet -- Show current use of remote protocol `QEnvironmentHexEncoded' (environment-hex-encoded) packet.
show remote environment-reset-packet -- Show current use of remote protocol `QEnvironmentReset' (environment-reset) packet.
show remote environment-unset-packet -- Show current use of remote protocol `QEnvironmentUnset' (environment-unset) packet.
show remote exec-event-feature-packet -- Show current use of remote protocol `exec-event-feature' (exec-event-feature) packet.
show remote exec-file -- Show the remote pathname for "run".
show remote fast-tracepoints-packet -- Show current use of remote protocol `FastTracepoints' (fast-tracepoints) packet.
show remote fetch-register-packet, show remote p-packet -- Show current use of remote protocol `p' (fetch-register) packet.
show remote fork-event-feature-packet -- Show current use of remote protocol `fork-event-feature' (fork-event-feature) packet.
show remote get-thread-information-block-address-packet -- Show current use of remote protocol `qGetTIBAddr' (get-thread-information-block-address) packet.
show remote get-thread-local-storage-address-packet -- Show current use of remote protocol `qGetTLSAddr' (get-thread-local-storage-address) packet.
show remote hardware-breakpoint-limit -- Show the maximum number of target hardware breakpoints.
show remote hardware-breakpoint-packet -- Show current use of remote protocol `Z1' (hardware-breakpoint) packet.
show remote hardware-watchpoint-length-limit -- Show the maximum length (in bytes) of a target hardware watchpoint.
show remote hardware-watchpoint-limit -- Show the maximum number of target hardware watchpoints.
show remote hostio-close-packet -- Show current use of remote protocol `vFile:close' (hostio-close) packet.
show remote hostio-fstat-packet -- Show current use of remote protocol `vFile:fstat' (hostio-fstat) packet.
show remote hostio-open-packet -- Show current use of remote protocol `vFile:open' (hostio-open) packet.
show remote hostio-pread-packet -- Show current use of remote protocol `vFile:pread' (hostio-pread) packet.
show remote hostio-pwrite-packet -- Show current use of remote protocol `vFile:pwrite' (hostio-pwrite) packet.
show remote hostio-readlink-packet -- Show current use of remote protocol `vFile:readlink' (hostio-readlink) packet.
show remote hostio-setfs-packet -- Show current use of remote protocol `vFile:setfs' (hostio-setfs) packet.
show remote hostio-unlink-packet -- Show current use of remote protocol `vFile:unlink' (hostio-unlink) packet.
show remote hwbreak-feature-packet -- Show current use of remote protocol `hwbreak-feature' (hwbreak-feature) packet.
show remote install-in-trace-packet -- Show current use of remote protocol `InstallInTrace' (install-in-trace) packet.
show remote interrupt-on-connect -- Show whether interrupt-sequence is sent to remote target when gdb connects to.
show remote interrupt-sequence -- Show interrupt sequence to remote target.
show remote kill-packet -- Show current use of remote protocol `vKill' (kill) packet.
show remote library-info-packet -- Show current use of remote protocol `qXfer:libraries:read' (library-info) packet.
show remote library-info-svr4-packet -- Show current use of remote protocol `qXfer:libraries-svr4:read' (library-info-svr4) packet.
show remote memory-map-packet -- Show current use of remote protocol `qXfer:memory-map:read' (memory-map) packet.
show remote memory-read-packet-size -- Show the maximum number of bytes per memory-read packet.
show remote memory-write-packet-size -- Show the maximum number of bytes per memory-write packet.
show remote multiprocess-feature-packet -- Show current use of remote protocol `multiprocess-feature' (multiprocess-feature) packet.
show remote no-resumed-stop-reply-packet -- Show current use of remote protocol `N stop reply' (no-resumed-stop-reply) packet.
show remote noack-packet -- Show current use of remote protocol `QStartNoAckMode' (noack) packet.
show remote osdata-packet -- Show current use of remote protocol `qXfer:osdata:read' (osdata) packet.
show remote pass-signals-packet -- Show current use of remote protocol `QPassSignals' (pass-signals) packet.
show remote pid-to-exec-file-packet -- Show current use of remote protocol `qXfer:exec-file:read' (pid-to-exec-file) packet.
show remote program-signals-packet -- Show current use of remote protocol `QProgramSignals' (program-signals) packet.
show remote query-attached-packet -- Show current use of remote protocol `qAttached' (query-attached) packet.
show remote read-aux-vector-packet -- Show current use of remote protocol `qXfer:auxv:read' (read-aux-vector) packet.
show remote read-btrace-conf-packet -- Show current use of remote protocol `qXfer:btrace-conf' (read-btrace-conf) packet.
show remote read-btrace-packet -- Show current use of remote protocol `qXfer:btrace' (read-btrace) packet.
show remote read-fdpic-loadmap-packet -- Show current use of remote protocol `qXfer:fdpic:read' (read-fdpic-loadmap) packet.
show remote read-sdata-object-packet -- Show current use of remote protocol `qXfer:statictrace:read' (read-sdata-object) packet.
show remote read-siginfo-object-packet -- Show current use of remote protocol `qXfer:siginfo:read' (read-siginfo-object) packet.
show remote read-watchpoint-packet -- Show current use of remote protocol `Z3' (read-watchpoint) packet.
show remote reverse-continue-packet -- Show current use of remote protocol `bc' (reverse-continue) packet.
show remote reverse-step-packet -- Show current use of remote protocol `bs' (reverse-step) packet.
show remote run-packet -- Show current use of remote protocol `vRun' (run) packet.
show remote search-memory-packet -- Show current use of remote protocol `qSearch:memory' (search-memory) packet.
show remote set-register-packet, show remote P-packet -- Show current use of remote protocol `P' (set-register) packet.
show remote set-working-dir-packet -- Show current use of remote protocol `QSetWorkingDir' (set-working-dir) packet.
show remote software-breakpoint-packet -- Show current use of remote protocol `Z0' (software-breakpoint) packet.
show remote startup-with-shell-packet -- Show current use of remote protocol `QStartupWithShell' (startup-with-shell) packet.
show remote static-tracepoints-packet -- Show current use of remote protocol `StaticTracepoints' (static-tracepoints) packet.
show remote supported-packets-packet -- Show current use of remote protocol `qSupported' (supported-packets) packet.
show remote swbreak-feature-packet -- Show current use of remote protocol `swbreak-feature' (swbreak-feature) packet.
show remote symbol-lookup-packet -- Show current use of remote protocol `qSymbol' (symbol-lookup) packet.
show remote system-call-allowed -- Show if the host system(3) call is allowed for the target.
show remote target-features-packet -- Show current use of remote protocol `qXfer:features:read' (target-features) packet.
show remote thread-events-packet -- Show current use of remote protocol `QThreadEvents' (thread-events) packet.
show remote threads-packet -- Show current use of remote protocol `qXfer:threads:read' (threads) packet.
show remote trace-buffer-size-packet -- Show current use of remote protocol `QTBuffer:size' (trace-buffer-size) packet.
show remote trace-status-packet -- Show current use of remote protocol `qTStatus' (trace-status) packet.
show remote traceframe-info-packet -- Show current use of remote protocol `qXfer:traceframe-info:read' (traceframe-info) packet.
show remote unwind-info-block-packet -- Show current use of remote protocol `qXfer:uib:read' (unwind-info-block) packet.
show remote verbose-resume-packet -- Show current use of remote protocol `vCont' (verbose-resume) packet.
show remote verbose-resume-supported-packet -- Show current use of remote protocol `vContSupported' (verbose-resume-supported) packet.
show remote vfork-event-feature-packet -- Show current use of remote protocol `vfork-event-feature' (vfork-event-feature) packet.
show remote write-siginfo-object-packet -- Show current use of remote protocol `qXfer:siginfo:write' (write-siginfo-object) packet.
show remote write-watchpoint-packet -- Show current use of remote protocol `Z2' (write-watchpoint) packet.
show remoteaddresssize -- Show the maximum size of the address (in bits) in a memory packet.
show remotecache -- Show cache use for remote targets.
show remoteflow -- Show use of hardware flow control for remote serial I/O.
show remotelogbase -- Show numerical base for remote session logging.
show remotelogfile -- Show filename for remote session recording.
show remotetimeout -- Show timeout limit to wait for target to respond.
show remotewritesize -- Show the maximum number of bytes per memory write packet (deprecated).
show schedule-multiple -- Show mode for resuming threads of all processes.
show scheduler-locking -- Show mode for locking scheduler during execution.
show script-extension -- Show mode for script filename extension recognition.
show serial -- Show default serial/parallel port configuration.
show serial baud -- Show baud rate for remote serial I/O.
show serial parity -- Show parity for remote serial I/O.
show show-compact-regs -- whether to show a compact register view:
show show-compact-regs-align -- the number of characters reserved for each register and value:
show show-compact-regs-space -- the minimum number of characters separating each register:
show show-flags -- whether to show flags registers:
show show-retaddr-reg -- whether to show return address register:
show solib-search-path -- Show the search path for loading non-absolute shared library symbol files.
show stack-cache -- Show cache use for stack access.
show startup-with-shell -- Show use of shell to start subprocesses.
show step-mode -- Show mode of the step operation.
show stop-on-solib-events -- Show stopping for shared library events.
show struct-convention -- Show the convention for returning small structs.
show style -- Style-specific settings.
show style address -- Address display styling.
show style address background -- Show the background color for this property.
show style address foreground -- Show the foreground color for this property.
show style address intensity -- Show the display intensity for this property.
show style enabled -- Show whether CLI is enabled.
show style filename -- Filename display styling.
show style filename background -- Show the background color for this property.
show style filename foreground -- Show the foreground color for this property.
show style filename intensity -- Show the display intensity for this property.
show style function -- Function name display styling.
show style function background -- Show the background color for this property.
show style function foreground -- Show the foreground color for this property.
show style function intensity -- Show the display intensity for this property.
show style highlight -- Highlight display styling.
show style highlight background -- Show the background color for this property.
show style highlight foreground -- Show the foreground color for this property.
show style highlight intensity -- Show the display intensity for this property.
show style metadata -- Metadata display styling.
show style metadata background -- Show the background color for this property.
show style metadata foreground -- Show the foreground color for this property.
show style metadata intensity -- Show the display intensity for this property.
show style sources -- Show whether source code styling is enabled.
show style title -- Title display styling.
show style title background -- Show the background color for this property.
show style title foreground -- Show the foreground color for this property.
show style title intensity -- Show the display intensity for this property.
show style tui-active-border -- TUI active border display styling.
show style tui-active-border background -- Show the background color for this property.
show style tui-active-border foreground -- Show the foreground color for this property.
show style tui-border -- TUI border display styling.
show style tui-border background -- Show the background color for this property.
show style tui-border foreground -- Show the foreground color for this property.
show style variable -- Variable name display styling.
show style variable background -- Show the background color for this property.
show style variable foreground -- Show the foreground color for this property.
show style variable intensity -- Show the display intensity for this property.
show substitute-path -- Show one or all substitution rules rewriting the source directories.
show syntax-highlight -- Source code / assembly syntax highlight:
show syntax-highlight-style -- Source code / assembly syntax highlight stylename of pygments module:
show sysroot, show solib-absolute-prefix -- Show the current system root.
show target-charset -- Show the target character set.
show target-file-system-kind -- Show assumed file system kind for target reported file names.
show target-wide-charset -- Show the target wide character set.
show tcp -- TCP protocol specific variables.
show tcp auto-retry -- Show auto-retry on socket connect.
show tcp connect-timeout -- Show timeout limit in seconds for socket connection.
show tdesc -- Show target description specific variables.
show tdesc filename -- Show the file to read for an XML target description.
show telescope-lines -- number of lines to printed by the telescope command:
show telescope-offset-color -- color of the telescope command (offset prefix):
show telescope-offset-delimiter -- offset delimiter of the telescope command:
show telescope-offset-delimiter-color -- color of the telescope command (offset delimiter):
show telescope-offset-separator -- offset separator of the telescope command:
show telescope-offset-separator-color -- color of the telescope command (offset separator):
show telescope-register-color -- color of the telescope command (register):
show telescope-repeating-marker -- repeating values marker of the telescope command:
show telescope-repeating-marker-color -- color of the telescope command (repeating values marker):
show telescope-skip-repeating-val -- whether to skip repeating values of the telescope command:
show telescope-skip-repeating-val-minimum -- minimum amount of repeated values before skipping lines:
show trace-buffer-size -- Show requested size of trace buffer.
show trace-commands -- Show state of GDB CLI command tracing.
show trace-notes -- Show the notes string to use for current and future trace runs.
show trace-stop-notes -- Show the notes string to use for future tstop commands.
show trace-user -- Show the user name to use for current and future trace runs.
show trust-readonly-sections -- Show mode for reading from readonly sections.
show tui -- TUI configuration variables.
show tui active-border-mode -- Show the attribute mode to use for the active TUI window border.
show tui border-kind -- Show the kind of border for TUI windows.
show tui border-mode -- Show the attribute mode to use for the TUI window borders.
show tui compact-source -- Show whether the TUI source window is compact.
show tui tab-width -- Show the tab witdh, in characters, for the TUI.
show unwind-on-terminating-exception -- Show unwinding of stack if std::terminate() is called while in a call dummy.
show unwindonsignal -- Show unwinding of stack if a signal is received while in a call dummy.
show use-coredump-filter -- Show whether gcore should consider /proc/PID/coredump_filter.
show use-deprecated-index-sections -- Show whether to use deprecated gdb_index sections.
show user -- Show definitions of non-python/scheme user defined commands.
show values -- Elements of value history around item number IDX (or last ten).
show varsize-limit -- Show the maximum number of bytes allowed in a variable-size object.
show verbose -- Show verbosity.
show version -- Show what version of GDB this is.
show warranty -- Various kinds of warranty you do not have.
show watchdog -- Show watchdog timer.
show width -- Show number of characters where GDB should wrap lines of its output.
show write -- Show writing into executable and core files.

Command class: support

add-auto-load-safe-path -- Add entries to the list of directories from which it is safe to auto-load files.
add-auto-load-scripts-directory -- Add entries to the list of directories from which to load auto-loaded scripts.
alias -- Define a new command that is an alias of an existing command.
apropos -- Search for commands matching a REGEXP.
define -- Define a new command name.  Command name is argument.
define-prefix -- Define or mark a command as a user-defined prefix command.
demangle -- Demangle a mangled name.
document -- Document a user-defined command.
dont-repeat -- Don't repeat this command.
down-silently -- Same as the `down' command, but does not print anything.
echo -- Print a constant string.  Give string as argument.
help, h -- Print list of commands.
if -- Execute nested commands once IF the conditional expression is non zero.
interpreter-exec -- Execute a command in an interpreter.
make -- Run the ``make'' program using the rest of the line as arguments.
new-ui -- Create a new UI.
overlay, ov, ovly -- Commands for debugging overlays.
overlay auto -- Enable automatic overlay debugging.
overlay list-overlays -- List mappings of overlay sections.
overlay load-target -- Read the overlay mapping state from the target.
overlay manual -- Enable overlay debugging.
overlay map-overlay -- Assert that an overlay section is mapped.
overlay off -- Disable overlay debugging.
overlay unmap-overlay -- Assert that an overlay section is unmapped.
pipe, | -- Send the output of a gdb command to a shell command.
quit, q -- Exit gdb.
shell, ! -- Execute the rest of the line as a shell command.
source -- Read commands from a file named FILE.
up-silently -- Same as the `up' command, but does not print anything.
while -- Execute nested commands WHILE the conditional expression is non zero.

Command class: text-user-interface

+ -- Scroll window forward.
- -- Scroll window backward.
< -- Scroll window text to the left.
> -- Scroll window text to the right.
focus, fs -- Set focus to named window or next/prev window.
layout -- Change the layout of windows.
layout asm -- Apply the "asm" layout.
layout next -- Apply the next TUI layout.
layout prev -- Apply the previous TUI layout.
layout regs -- Apply the TUI register layout.
layout split -- Apply the "split" layout.
layout src -- Apply the "src" layout.
refresh -- Refresh the terminal display.
tui -- Text User Interface commands.
tui disable -- Disable TUI display mode.
tui enable -- Enable TUI display mode.
tui new-layout -- Create a new TUI layout.
tui reg -- TUI command to control the register window.
update -- Update the source window and locator to display the current execution point.
winheight, wh -- Set or modify the height of a specified window.

Command class: tracepoints

actions -- Specify the actions to be taken at a tracepoint.
collect -- Specify one or more data items to be collected at a tracepoint.
end -- Ends a list of commands or actions.
passcount -- Set the passcount for a tracepoint.
tdump -- Print everything collected at the current tracepoint.
teval -- Specify one or more expressions to be evaluated at a tracepoint.
tfind -- Select a trace frame.
tfind end, tfind none -- De-select any trace frame and resume 'live' debugging.
tfind line -- Select a trace frame by source line.
tfind outside -- Select a trace frame whose PC is outside the given range (exclusive).
tfind pc -- Select a trace frame by PC.
tfind range -- Select a trace frame whose PC is in the given range (inclusive).
tfind start -- Select the first trace frame in the trace buffer.
tfind tracepoint -- Select a trace frame by tracepoint number.
tsave -- Save the trace data to a file.
tstart -- Start trace data collection.
tstatus -- Display the status of the current trace data collection.
tstop -- Stop trace data collection.
tvariable -- Define a trace state variable.
while-stepping, stepping, ws -- Specify single-stepping behavior at a tracepoint.

Command class: user-defined

address -- Print virtual memory map pages. Results can be filtered by providing address/module name.
arena -- Print the contents of an arena, default to the current thread's arena.
arenas -- List this process's arenas.
argc -- Prints out the number of arguments.
args -- Prints out the contents of argv.
argv -- Prints out the contents of argv.
aslr -- Check the current ASLR status, or turn it on/off.
auxv -- Print information from the Auxiliary ELF Vector.
awk -- Generic command wrapper
bash -- Generic command wrapper
bc -- Clear the breakpoint with the specified index.
bd -- Disable the breakpoint with the specified index.
be -- Enable the breakpoint with the specified index.
bins -- Print the contents of all an arena's bins and a thread's tcache, default to the current thread's arena and tcache.
bl -- List breakpoints.
bp -- Set a breakpoint at the specified address.
breakrva -- Break at RVA from PIE base.
brva -- This command is not documented.
bugreport -- Generate bugreport
canary -- Print out the current stack canary.
cat -- Generic command wrapper
chattr -- Generic command wrapper
checksec -- Prints out the binary security settings using `checksec`.
chmod -- Generic command wrapper
chown -- Generic command wrapper
comm -- Put comments in assembly code
config -- Shows pwndbg-specific config. The list can be filtered.
configfile -- Generates a configuration file for the current Pwndbg options
context -- Print out the current register, instruction, and stack context.
contextoutput -- Sets the output of a context section.
contextunwatch -- Removes an expression previously added to be watched.
contextwatch -- Adds an expression to be shown on context.
cp -- Generic command wrapper
cpsr -- Print out ARM CPSR or xPSR register
ctx -- Print out the current register, instruction, and stack context.
ctx-out -- Sets the output of a context section.
ctx-unwatch -- Removes an expression previously added to be watched.
ctx-watch -- Adds an expression to be shown on context.
cunwatch -- Removes an expression previously added to be watched.
cwatch -- Adds an expression to be shown on context.
da -- Dump a string at the specified address.
date -- Generic command wrapper
db -- Starting at the specified address, dump N bytes.
dc -- Starting at the specified address, hexdump.
dd -- Starting at the specified address, dump N dwrods.
dds -- Dump pointers and symbols at the specified address.
diff -- Generic command wrapper
distance -- Print the distance between the two arguments.
down, dow, do -- Select and print stack frame called by this one.
dps -- Dump pointers and symbols at the specified address.
dq -- Starting at the specified address, dump N qwords.
dqs -- Dump pointers and symbols at the specified address.
ds -- Dump a string at the specified address.
dt -- Dump out information on a type (e.g. ucontext_t).
dumpargs -- Prints determined arguments for call instruction.
dw -- Starting at the specified address, dump N words.
eb -- Write hex bytes at the specified address.
ed -- Write hex dwords at the specified address.
egrep -- Generic command wrapper
elfheader -- Prints the section mappings contained in the ELF header.
emulate -- Like nearpc, but will emulate instructions from the current $PC forward.
entry -- Set a breakpoint at the first instruction executed in
entry_point -- GDBINIT compatibility alias to print the entry point. See also the 'entry' command.
env -- Prints out the contents of the environment.
environ -- Prints out the contents of the environment.
envp -- Prints out the contents of the environment.
eq -- Write hex qwords at the specified address.
errno -- Converts errno (or argument) to its string representation.
ew -- Write hex words at the specified address.
ez -- Write a string at the specified address.
eza -- Write a string at the specified address.
fastbins -- Print the contents of an arena's fastbins, default to the current thread's arena.
find_fake_fast -- Find candidate fake fast chunks overlapping the specified address.
fsbase -- Prints out the FS base address.  See also $fsbase.
getfile -- Gets the current file.
getpid -- Get the pid.
ghidra -- Decompile a given function using ghidra
go -- Windbg compatibility alias for 'continue' command.
got -- Show the state of the Global Offset Table
gotplt -- Prints any symbols found in the .got.plt section if it exists.
grep -- Generic command wrapper
gsbase -- Prints out the GS base address.  See also $gsbase.
heap -- Iteratively print chunks on a heap, default to the current thread's active heap.
hexdump -- Hexdumps data at the specified address or module name (or at $sp)
id -- Generic command wrapper
init -- GDBINIT compatibility alias for 'start' command.
j -- Synchronize IDA's cursor with GDB
k -- Print a backtrace (alias 'bt').
kd -- Dump pointers and symbols at the specified address.
largebins -- Print the contents of an arena's largebins, default to the current thread's arena.
leakfind -- Attempt to find a leak chain given a starting address.
less -- Generic command wrapper
libs -- GDBINIT compatibility alias for 'libs' command.
lm -- Print virtual memory map pages. Results can be filtered by providing address/module name.
ln -- List the symbols nearest to the provided value.
ls -- Generic command wrapper
main -- GDBINIT compatibility alias for 'main' command.
malloc_chunk -- Print a chunk.
man -- Generic command wrapper
memfrob -- Memfrobs a region of memory.
mkdir -- Generic command wrapper
mktemp -- Generic command wrapper
more -- Generic command wrapper
mp -- Print the mp_ struct's contents.
mprotect -- Calls mprotect. x86_64 only.
mv -- Generic command wrapper
nano -- Generic command wrapper
nc -- Generic command wrapper
nearpc -- Disassemble near a specified address.
nextcall -- Breaks at the next call instruction
nextjmp -- Breaks at the next jump instruction.
nextjump -- Breaks at the next jump instruction.
nextproginstr -- Breaks at the next instruction that belongs to the running program
nextret -- Breaks at next return-like instruction
nextsc -- Breaks at the next syscall not taking branches.
nextsyscall -- Breaks at the next syscall not taking branches.
pc -- Windbg compatibility alias for 'nextcall' command.
pdisass -- Compatibility layer for PEDA's pdisass command.
peb -- Not be windows.
pid -- Gets the pid.
piebase -- Calculate VA of RVA from PIE base.
ping -- Generic command wrapper
pkill -- Generic command wrapper
plt -- Prints any symbols found in the .plt section if it exists.
probeleak -- Pointer scan for possible offset leaks.
procinfo -- Display information about the running process.
ps -- Generic command wrapper
pstree -- Generic command wrapper
pwd -- Generic command wrapper
pwndbg -- Prints out a list of all pwndbg commands. The list can be optionally filtered if filter_pattern is passed.
r2 -- Launches radare2
r2pipe -- Execute stateful radare2 commands through r2pipe
radare2 -- Launches radare2
regs -- Print out all registers and enhance the information.
reinit_pwndbg -- Makes pwndbg reinitialize all state.
reload -- Reload pwndbg.
retaddr -- Print out the stack addresses that contain return addresses.
rm -- Generic command wrapper
rop -- Dump ROP gadgets with Jon Salwan's ROPgadget tool.
ropgadget -- Dump ROP gadgets with Jon Salwan's ROPgadget tool.
ropper -- ROP gadget search with ropper.
save_ida -- Save the ida database.
search -- Search memory for byte sequences, strings, pointers, and integer values
sed -- Generic command wrapper
sh -- Generic command wrapper
smallbins -- Print the contents of an arena's smallbins, default to the current thread's arena.
so -- Sets a breakpoint on the instruction after this one
sort -- Generic command wrapper
ssh -- Generic command wrapper
sstart -- GDBINIT compatibility alias for 'tbreak __libc_start_main; run' command.
stack -- dereferences on stack data with specified count and offset.
start -- Set a breakpoint at a convenient location in the binary,
stepover -- Sets a breakpoint on the instruction after this one
stepret -- Breaks at next return-like instruction by 'stepping' to it
stepsc -- Breaks at the next syscall by taking branches.
stepsyscall -- Breaks at the next syscall by taking branches.
sudo -- Generic command wrapper
tail -- Generic command wrapper
tcache -- Print a thread's tcache contents, default to the current thread's tcache.
tcachebins -- Print the contents of a tcache, default to the current thread's tcache.
telescope -- Recursively dereferences pointers starting at the specified address
theme -- Shows pwndbg-specific theme config. The list can be filtered.
themefile -- Generates a configuration file for the current Pwndbg theme options
top -- Generic command wrapper
top_chunk -- Print relevant information about an arena's top chunk, default to current thread's arena.
touch -- Generic command wrapper
try_free -- Check what would happen if free was called with given address
u -- Starting at the specified address, disassemble N instructions.
uniq -- Generic command wrapper
unsortedbin -- Print the contents of an arena's unsortedbin, default to the current thread's arena.
up -- Select and print stack frame that called this one.
version -- Displays gdb, python and pwndbg versions.
vi -- Generic command wrapper
vim -- Generic command wrapper
vis_heap_chunks -- Visualize chunks on a heap, default to the current arena's active heap.
vmmap -- Print virtual memory map pages. Results can be filtered by providing address/module name.
vmmap_add -- Add Print virtual memory map page.
vmmap_clear -- Clear the vmmap cache.
vmmap_load -- Load virtual memory map pages from ELF file.
vprot -- Print virtual memory map pages. Results can be filtered by providing address/module name.
w -- Generic command wrapper
wget -- Generic command wrapper
who -- Generic command wrapper
whoami -- Generic command wrapper
xinfo -- Shows offsets of the specified address to useful other locations
xor -- XOR `count` bytes at address` with the key key`.
xpsr -- Print out ARM xPSR or CPSR register
xuntil -- Continue execution until an address or function.

Unclassified commands

add-inferior -- Add a new inferior.
clone-inferior -- Clone inferior ID.
eval -- Construct a GDB command and then evaluate it.
flash-erase -- Erase all flash memory regions.
function -- Placeholder command for showing help on convenience functions.
function _any_caller_is -- Check all calling function's names.
function _any_caller_matches -- Compare all calling function's names with a regexp.
function _as_string -- Return the string representation of a value.
function _caller_is -- Check the calling function's name.
function _caller_matches -- Compare the calling function's name with a regexp.
function _cimag -- Extract the imaginary part of a complex number.
function _creal -- Extract the real part of a complex number.
function _gdb_maint_setting -- $_gdb_maint_setting - returns the value of a GDB maintenance setting.
function _gdb_maint_setting_str -- $_gdb_maint_setting_str - returns the value of a GDB maintenance setting as a string.
function _gdb_setting -- $_gdb_setting - returns the value of a GDB setting.
function _gdb_setting_str -- $_gdb_setting_str - returns the value of a GDB setting as a string.
function _isvoid -- Check whether an expression is void.
function _memeq -- $_memeq - compare bytes of memory.
function _regex -- $_regex - check if a string matches a regular expression.
function _streq -- $_streq - check string equality.
function _strlen -- $_strlen - compute string length.
function argc --
function argv --
function environ --
function envp --
function fsbase -- Get the flat address of memory based off of the named segment register.
function gsbase -- Get the flat address of memory based off of the named segment register.
function ida -- This function is not documented.
function rebase -- This function is not documented.
jit-reader-load -- Load FILE as debug info reader and unwinder for JIT compiled code.
jit-reader-unload -- Unload the currently loaded JIT debug info reader.
remove-inferiors -- Remove inferior ID (or list of IDs).
unset -- Complement to certain "set" commands.
unset environment -- Cancel environment variable VAR for the program.
unset exec-wrapper -- Disable use of an execution wrapper.
unset substitute-path -- Delete one or all substitution rules rewriting the source directories.
unset tdesc -- Unset target description specific variables.
unset tdesc filename -- Unset the file to read for an XML target description.

 

 

728x90

소스코드는 이러한 과정을 통해서 컴파일 또는 빌드가 되게 됩니다.

gcc의 경우 -save-temps 옵션을 주고 빌드를 하게 되면 아래와 같이 여러 가지 빌드 중 생긴 파일이 나오게 됩니다.

test.c 는 소스파일입니다.

test.i 는 전처리기를 거친 소스파일입니다.

test.s 는 소스코드를 어셈블러가 어셈블리어로 컴파일 한 파일입니다.

test.o 는 어셈블리어를 기계어로 컴파일한 파일입니다.

a.out 은 test.o 를 실행 가능하게 만든 파일입니다.

전처리기

코드를 보면

#include <stdio.h>
#define test "test"
#pragma once()

같은 앞에 #이 붙은 것들을 전처리 문이라고 부릅니다.

전처리 문의 종류는 여러 가지가 있는데

 

  • 파일 처리를 위한 전처리문 : #include
  • 형태 처리를 위한 전처리문 : #define, #undef
  • 조건 처리를 위한 전처리문 : #if, #ifdef, #else, #elif, #endif
  • 에러 처리를 위한 전처리문 : #error
  • 디버깅을 위한 전처리문 : #line
  • 컴파일 옵션 처리를 위한 전처리 문 : #pragma

이렇게 있습니다. 하지만 이 글은 실행파일을 만드는 과정을 설명하는 글이기 때문에 include 만 간단히 보고 넘어가도록 하겠습니다.

나머지는 나중에 시간이 남게 된다면 한번 써보도록 하겠습니다.

 

#include

헤더 파일과 같은 외부 파일을 코드에 포함시키도록 합니다.

 

위와 같은 코드를 작성하고, gcc에서 -save-temps 옵션을 주고 빌드를 해보도록 하겠습니다. 그다음 test.i 파일을 확인해보겠습니다.

저희가 작성한 코드 위로 stdio.h 의 내용이 추가가 되었습니다.

이게 전처리기에서 #include 전처리문이 하는 역할입니다.

 

컴파일러

어휘 분석기 -> 구문 분석기 -> 의미 분석기 -> 중간 코드 -> 독립적 코드 최적화 -> 코드 생성기 -> 의존적 코드 최적화 -> 어셈블리어

: 소스코드를 분석합니다.

: 분석한 소스코드를 토태로 cpu에 독립적인 중간 코드를 만들고 최적화를 진행합니다.

: 중간코드를 cpu에 의존적인 어셈블리어로 만들고 최적화를 진행합니다.

 

이렇게 코드 분석, 코드 생성, 최적화가 끝난 어셈블리어 코드는 어셈블러에서 기계어로 변경하게 됩니다.

어셈블러

어셈블러에서는 빌드하도록 지정된 각 ISA의 명령어 포맷에 따라서 기계어로 변경해줍니다.

위 사진은 ARMv7-M 아키텍처의 명령어 포맷 중 하나입니다.

하지만 어셈블러에서 기계어로 변경했다고 하지만 그 변경한 기계어에는 #include로 외부 파일을 참조한 경우

참조된 외부 함수나 코드는 포함되어 있지 않습니다.

그래서 어셈블러에서 나온 코드만으론 작동이 되지 않습니다.

아까 빌드한 코드에서 어셈블러가 어셈블리어를 기계어로 바꾼 파일인 test.o 를 실행시켜보면

이런 식으로 실행이 불가능한 것을 볼 수 있습니다.

그러면 안의 내용은 어떻게 되어 있는지 궁금하기 때문에 objdump 명령어를 사용하여 확인해보도록 하겠습니다.

printf 함수는 선언되어 있지 않고, 그냥 호출하는 callq 명령어만 있을 뿐입니다.

그러면 어셈블러에서 나온 object file 만 가지고서는 실행을 할 수 없기 때문에 #include로 참조한 라이브러리나 파일들을 다 같이 합쳐서 실행파일로 만들어 주는 친구가 있는데 그 친구의 이름이 링커입니다.

 

근데 생각해보니 분명 test.i 파일에서는 어셈블리어 코드에 stdio.h 파일의 내용이 포함되어 있었는데 왜 test.o 파일에는 stdio.h 파일의 내용이 포함되어 있지 않은걸까요?

test.i 파일에 포함되어 있는 내용은 소스코드를 분석할때 사용되고 실제로는 stdio.h 파일은 링커에서 연결됩니다.

그럼 test.s 는 test.i 를 어셈블리어로 변경한게 아니라 test.c 를 어셈블리어로 변경한게 되겠죠

링커

링커는 여러가지 목적 파일이나 라이브러리 파일들을 합쳐주는 역할을 하게 됩니다.

근데 어셈블러에서 한 번에 외부 파일, 라이브러리 참조까지 해서 만들면 될 거 같은데 왜 어셈블러는 object file 만 만들어주고 링커가 연결을 시켜주는 것일까요?

이유는 한번에 참조를 해서 만들면, 라이브러리 하나가 바뀌면 그 라이브러리를 참조한 모든 코드들을 다시 빌드해야 합니다.

그러면 빌드하는데 시간이 많이 들어가게 되기 때문에 링커를 이용해서 라이브러리가 바뀌면 링킹만 다시 해주면 되게 간단하게 만드는 것입니다.

 

그러면 링커는 어떻게 링킹을 해주는 것일까요

링커는 두가지 방법 중 하나로 링킹을 해줍니다.

동적 링크(Dynamic Link)와 정적 링크(Static Link)

동적 링크에는 *.dll *.so *.sa 파일이 사용됩니다.

정적 링크에서는 c 를 빌드하면 *.lib 파일이 보일 때가 있습니다.

이 .lib 파일이 실행파일에 포함되기 전의 라이브러리 파일입니다.

아까 빌드한 test.c를 file 명령어를 통해서 정보를 확인해보겠습니다.

dynamically linked라고 써져있는 게 보이실 겁니다. a.out 파일은 동적 링크를 통해서 링킹이 되었다는 걸 알 수 있습니다.

 

그러면 정적 링크와 동적 링크에는 장단점이 있을 텐데 어떤 장단점이 있는지 알아보도록 하겠습니다.

 

정적 링크

정적 링크를 하면 링커가 빌드를 할 때 프로그램이 필요로 하는 부분을 라이브러리에서 실행파일로 복사합니다.

 

장점

실행 파일에 이미 라이브러리가 포함되어 있기 때문에 라이브러리가 따로 필요가 없고, 의존성 문제도 생기지 않습니다.

그리고 라이브러리가 이미 포함되어 있기 때문에 실행 속도가 빨라집니다.

 

단점

실행 파일에 이미 라이브러리가 포함되어 있기 때문에 실행파일을 메모리에 올려야 하기 때문에 메모리 용량을 많이 잡아먹습니다. 그리고 실행파일 자체의 용량도 커지게 됩니다.

그리고 같은 프로그램을 여러 개 실행하게 되면 같은 라이브러리가 메모리에 여러 번 올라가게 됩니다. 그래서 용량을 매우 많이 잡아먹습니다.

라이브러리가 업데이트가 되거나 변경이 되게 되면 컴파일을 다시 해야 합니다. *중요

 

동적 링크

동적 링크를 하면 라이브러리가 실행이 될 때 링크됩니다.

stub이라는 걸 사용하여서 함수를 호출했을 때 라이브러리가 없으면 라이브러리를 메모리에 올리고, 자기 자신이 그 라이브러리에 함수의 주소로 대체됩니다.

 

장점

한 라이브러리는 메모리에 한 번만 올라가기 때문에 정적 링크에 비해서 메모리 사용량이 훨씬 적습니다.

라이브러리가 실행파일에 포함되어 있지 않기 때문에 실행파일의 용량이 줄어들게 됩니다.

라이브러리가 업데이트가 되거나 변경이 되어도 그 라이브러리만 바꾸면 됩니다. *중요

 

단점

라이브러리가 저장되어 있는 주소로 점프를 하기 때문에 약간의 overhead 가 생기고, 라이브러리 적재와 점프를 위한 불필요한 코드가 생기게 됩니다. 

728x90

용어 정리

변수: 변하는 값을 저장하는 곳. 데이터를 저장하기 위해 메모리에서 공간을 할당 받음.

주소값: 변수에서 메모리에서 할당받은 공간의 시작 주소

포인터: 위의 주소값을 저장하는 변수(또는 상수)

상수 포인터: 다른 주소값을 가리키도록 바꿀 순 있으나, 그 주소에 있는 값을 바꿀 순 없음.

포인터 상수: 다른 주소값을 가리키도록 바꿀 수 없으나, 그 주소에 있는 값을 바꿀 순 있음.

 

포인터 선언

변수타입* 변수명;
변수타입 * 변수명;
변수타입 *변수명 = 주소값;

으로 선언할 수 있습니다. (*이 어디 붙어도 상관없습니다.)

int a = 10
int* b = &a;

연산자

& 연산자(주소 연산자)

&변수

이렇게 사용할 수 있다.

int a = 10;
print("%p", &a); // %p 는 주소값을 출력할 때 사용합니다.

이런 식으로 & 연산자를 사용하게 되면 변수 a의 주소값이 출력됩니다.

* 연산자(참조 또는 역참조 연산자)

* 연산자는 뒤에 오는 주소값에서 그 주소에 담겨있는 값에 접근하는 데 사용합니다.

*변수

예를 들어 "*&변수"를 하게 되면 변수의 주소값에서 그 주소에 담겨있는 값을 가져오게 되므로 변수의 값이 나오게 됩니다.

int a = 948;
int* b = &a;
printf("%p %d\n", &a, *&a);
printf("%p %d", b, *b);

결과는

(a의 주소값) 948

(a의 주소값) 948

이 나오게 됩니다.

포인터 연산

포인터의 덧셈과 뺄셈

포인터의 덧셈

int a = 50;
int *b = &a;

char c = 'c';
char* d = &c;

printf("%p\n", b); //0061FF14
printf("%p\n", d); //0061FF13

printf("%p\n", b + 1); //0061FF18
printf("%p", d + 1); //0061FF14

* 포인터 간의 덧셈은 안됩니다. (쓸 이유가 없음)

* 포인터에 x만큼 더하면 주소값은 (x * 자료형) 만큼 늘어납니다.

포인터의 뺄셈

int a[2] = {50, 100};

int *a1 = a;
int *a2 = a + 1;

printf("%d\n", *a);
printf("%d\n", *(a + 1));

printf("%p %d\n", a1, *a1);
printf("%p %d\n", a2, *a2);
printf("%d\n", a2 - a1);

* 배열 자체는 배열의 첫 번째 주소를 나타내므로 *a는 배열의 첫 번째 항목, *(a+1)은 배열의 두 번째 항목이 됩니다.

* a1은 배열의 첫 번째 항목의 주소, a2는 배열의 두 번째 항목의 주소이므로 a2-a1은 배열의 두 번째 항목과 첫번째 항목의 주소의 차가 됩니다.

* a2 - a도 똑같이 첫번째 항목과 두번째 항목의 주소의 차가 되고 이걸 이용하면 a2가 배열에서 위치한 위치를 알 수 있습니다.

* lowerbound나 upperbound를 사용할 때 반환값에서 배열을 빼면 검색한 항목의 위치(index)를 알 수 있습니다.

포인터의 곱셈과 나눗셈

불가능합니다.

Call By Value

#include <stdio.h>

void test(int a){
    a = 10;
    printf("in test function, variable a value: %d\n", a); //10
}

int main()
{
    int a = 90;
    printf("before invoke test function, variable a value : %d\n", a); //90
    test(a);
    printf("in main function, variable a value: %d", a); //90
    return 0;
}

함수의 인자에 변수의 값을 복사해서 전달해준다.

함수 내에서 값을 바꿔도 원래 변수의 값이 변하지는 않는다. 

Call By Reference

#include <stdio.h>

void test(int *a)
{
    *a = 10;
    printf("in test function, variable a value: %d\n", *a); //10
}

int main()
{
    int a = 90;
    printf("before invoke test function, variable a value : %d\n", a); //90
    test(&a);
    printf("in main function, variable a value: %d", a); //10
    return 0;
}

함수의 인자에 변수의 주소값을 전달해준다.

함수에서 참조 연산자를 이용해서 값을 바꾸면 원래 변수의 값도 변한다.

다중 포인터

포인터도 변수이므로 포인터에 대한 주소값을 저장하는 포인터를 만들 수 있습니다.

이것을 다중 포인터라 부르게 됩니다. 아래 예시를 보면

int a = 10;
int *b = &a;
int **c = &b;
printf("%p %p %p\n", &a, b, *c);
printf("%d %d %d", a, *b, **c);

포인터 c는 포인터 b의 주소값을 저장하는 2중 포인터인 것을 알 수 있습니다.

포인터를 선언할 때 변수타입* 변수명; 으로 한다고 했었는데 int **c = &b;에서 (int*)가 자료형이 됩니다.

자료형*변수명 = 주소값;

int *   *c        = &b;

 

3중 포인터 예시를 보면

int a = 10;
int *b = &a;
int **c = &b;
int ***d = &c;
printf("%p %p %p %p\n", &a, b, *c, **d);
printf("%d %d %d %d", a, *b, **c, ***d);

이런 식으로 한 겹이 추가될 때마다 자료형에 *이 하나씩 늘어나게 됩니다.

728x90

UART핀 찾기
UART

그림에서는 UART가 3핀으로 구성되어 있지만, 보통은 VCC와 같이 4핀으로 구성되어 있는 경우가 많습니다.

위 사진에서 보면 4핀이 연속으로 구멍이 뚫려있는 곳이 있다. 찾기 힘들면 기판에 RX, TX 가 써져있는 것을 찾으면 됩니다.

노란색 줄 친 부분이 GND, TX, RX이고 빨간 원 친 부분 전체가 UART 홀입니다.

(참고로 보드에 써져있는 0BA440은 기판 색입니다.)

 

아래 써져있는 스펙을 기준으로 찾아본 결과 가장 비슷하게 생긴건 NEXT-606N 인것 같습니다.

NEXT-606N

첫 번째 사진

칩에 써져있는 정보대로 MediaTek 사이트에 검색해본 결과

www.mediatek.com/products/homenetworking/mt7628k-n-a

 

MT7628K/N/A

MT7628K/N/A 2x2 802.11n platform for N300/AC750/AC1200 router and repeater MediaTek MT7628 family are the new generation of 2T2R 802.11n Wi-Fi AP/Router (SoC). MT7628 improve the RF performance, reduce power consumption and optimize the BOM cost and make i

www.mediatek.com

N300 / AC750 / AC1200 라우터 및 리피터 용 SoC(System on a Chip)인 것을 알 수 있습니다.

상세 펙은 이렇게 되는 것 같습니다.

MT7628

MIPS 아키텍쳐를 사용하는 싱글코어 32비트 575/580MHz 클럭의 cpu가 달려있고

16bit DRAM 2개에 I2S와 PCM을 사용하는 오디오 인터페이스

소프트웨어론 eCos, Linux 2.6.36, 3.10 그리고 OpenWRT를 사용할 수 있습니다.

IEEE 802.11n(WiFi 4)의 와이파이를 쓸 수 있고 2.4GHz 주파수를 쓸 수 있네요.

그리고 2개의 송수신 안테나를 달 수 있는것 같습니다.

5포트짜리 Fast Ethernet(100Mbit/s) 스위치를 쓸 수 있고 1개의 포트를 IoT 용으로 쓸 수 있는것 같습니다.

I/O 는 GPIO와 UART가 있네요. 아마 GPIO는 LED에 사용하지 않았을까 합니다.

 

좀 더 상세한 데이터 시트는 여기 있습니다.

vonger.cn/upload/MT7628_Full.pdf

 

두 번째 사진

W9751G6KB-25를 검색해본 결과

www.ariat-tech.kr/parts/winbond-electronics-corporation/W9751G6KB-25

512MBit => 64MB의 SDRAM인 것을 확인할 수 있었습니다.

상세 스펙은 이렇게 되는 것 같습니다.

512Mbit(64MB) SDRAM(Synchronous Dynamic RAM)이고 8x12.5 BGA(Ball Grid Array) 방식이며 속도(클럭)는 200MHz 인것 같습니다. 인터페이스가 Parallel 이라고 하는데 데이터 시트를 찾아본 결과 SSTL 인터페이스에 1.8V를 사용합니다.

8x12.5 BGA

세 번째 사진

잘 보이진 않지만 25032JVS10 혹은 25Q32JVSIQ 인 듯합니다.

그래서 검색해본 결과 정확히 같은 모델명은 나오지 않았지만

datasheetspdf.com/pdf/1330826/Winbond/W25Q128JV/1

kr.mouser.com/ProductDetail/Winbond/W25Q64JVSSIQ?qs=qSfuJ%252Bfl%2Fd4DecxlHDmB8w%3D%3D

등 32가 64로 바뀐듯한 모습의 IC들이 나왔고, 다른 데이터 시트를 찾아본 결과

위쪽에 마킹되는 문구에 맨 앞에 W랑 S가 두 개 들어가서 일련번호로 바뀌는 것을 알 수 있었습니다.

그러면 25Q32JVSIQ를 일련번호로 변경하면 W25Q32JVSSIQ 가 되고 검색해보니

pdf1.alldatasheet.co.kr/datasheet-pdf/download/932073/WINBOND/W25Q32JVSSIQ.html

데이터 시트를 발견할 수 있었습니다. 다운해보니

1. GENERAL DESCRIPTIONS The W25Q32JV (32M-bit) Serial Flash memory provides a storage solution for systems with limited space, pins and power. The 25Q series offers flexibility and performance well beyond ordinary Serial Flash devices. They are ideal for code shadowing to RAM, executing code directly from Dual/Quad SPI (XIP) and storing voice, text and data. The device operates on 2.7V to 3.6V power supply with current consumption as low as 1µA for power-down. The W25Q32JV array is organized into 16,384 programmable pages of 256-bytes each. Up to 256 bytes can be programmed at a time. Pages can be erased in groups of 16 (4KB sector erase), groups of 128 (32KB block erase), groups of 256 (64KB block erase) or the entire chip (chip erase). The W25Q32JV has 1,024 erasable sectors and 64 erasable blocks respectively. The small 4KB sectors allow for greater flexibility in applications that require data and parameter storage. (See Figure 2.) The W25Q32JV supports the standard Serial Peripheral Interface (SPI), and a high performance Dual/Quad output as well as Dual/Quad I/O SPI: Serial Clock, Chip Select, Serial Data I/O0 (DI), I/O1 (DO), I/O2, and I/O3. SPI clock frequencies of up to 133MHz are supported allowing equivalent clock rates of 266MHz (133MHz x 2) for Dual I/O and 532MHz (133MHz x 4) for Quad I/O when using the Fast Read Dual/Quad I/O instruction

32M-bit => 4MB 크기의 플래시 메모리이며 SPI 인터페이스를 사용하는 것을 알 수 있었습니다.

 

종합해 보자면

1. SoC으로 계산이랑 여러 가지 종합적인 것을 담당하고

2. DRAM으로 주기억 장치 역할을 하고

3. 플래시 메모리로 보조기억장치 역할을 한다는 것을 알 수 있습니다.

728x90

부트로더

컴퓨터(또는 MCU)의 전원이 켜질 때 일반적으로 램(RAM)에 운영 체제가 없습니다. 그래서 컴퓨터는 적은 양의 필요한 데이터와 함께 롬(ROM)에 저장된 작은 프로그램을 실행하여 운영체제를 보조 기억 장치에서 RAM에 로드합니다.

이 작업을 하는 작은 프로그램 부트 로더라고 합니다.

 

기능

1. 직렬 통신, 인터럽트, 타이머, 콘솔, 메모리, 각종 입출력 장치 등을 점검하여 실행 가능 상태로 만들어 줍니다.

2. 화면에 내용을 출력해서 사용자 인터페이스 기능을 합니다.

3. 커널을 메모리(RAM)에 로드시켜서 사용자 명령 처리를 준비하는 역할을 합니다.

 

부트로더의 종류

  • U-Boot(Universal Bootloader)
    • PPCBoot와 ARMBoot 프로젝트 기반
  • LILO(Linux Loader)
  • GRUB(Grand Unfied Bootloader)
  • Loadlin
  • EtherBoot
  • Blob
    • ARM용 부트로더
  • PMON(PROM Monitor)
    • MIPS 보드용
  • RedBoot
    • RedHat에서 개발 및 배포
    • eCos 기반

 

커널

운영체제의 핵심으로 하드웨어와 응용프로그램 사이에서 보안, 자원관리, 추상화를 해줍니다.

파일 시스템

운영체제에서 파일이나 자료를 쉽게 접근할 수 있도록 보관 또는 조직하는 체계

 

아이노드(inode): UFS와 같은 유닉스 계통 파일 시스템에서 사용하는 자료구조이며, 정규 파일, 디렉터리  파일 시스템에 관한 정보를 가지고 있습니다.

 

파일 시스템 내에서 파일이나 디렉토리는 고유한 inode 를 가지고 있으며, inode 번호를 통해 구분이 가능합니다.

 

컴퓨터에서 파일을 저장할 때 하드디스크에 연속적으로 저장하는것이 아닌 파일들을 조각으로 나눠서 저장하게 되는데, 그 파일들이 어디있는지를 기록해 둬야 합니다.

파일 시스템 종류

FAT(File Allocation Table)

볼륨의 맨 위에 FAT 이라는 테이블이 있고 그 테이블에 파일의 할당 정보를 저장합니다.

파일을 섹터 단위로 나누면 파일이 너무 작게 나눠지기 때문에 적당히 작게 나누기 위해서 클러스터를 사용합니다.

FAT 뒤에 숫자는 클러스터 ID를 저장하는데 사용하는 비트 수 입니다. 그래서 최대 표현 가능한 클러스터 수와 연관이 되어 있습니다.

 

NTFS(New Technology File System)

윈도우 NT부터 기본적으로 사용되는 파일 시스템으로, 클러스터 ID를 저장하는데 64비트를 사용합니다.

FAT과 달리 테이블을 사용하지 않고 B+ tree를 사용하여 탐색 속도가 빨라졌습니다.

그리고 아래에 나오는 저널링 파일 시스템을 사용하여 안정성이 높아졌습니다.

파일을 압축하여 보관하거나, 접근 권한을 제어하는 등 여러가지 기능이 생겼습니다.

하지만 윈도우만 생각하고 만들어서 호환성이 좋진 않습니다.

 

exFAT(EXtended File Allocation Table)

NTFS의 호환성 문제를 해결하기 위해서 만들어진 파일 시스템입니다.

FAT 에서 클러스터 ID를 저장하는데 사용하는 비트 수가 64비트로 바뀌었습니다.

 

EXT(EXTended file system)

리눅스 운영 체제를 위해서 만들어진 파일 시스템입니다.

Extended File System을 줄여 extfs 또는 ext로 씁니다.

부트섹터와 여러개의 블록 그룹으로 이루어져 있습니다.

부트섹터에는 부팅에 필요한 정보들이 담겨있고, 블록은 클러스터와 비슷한 역할을 수행합니다.

블록 그룹은 Super Block, Group Descript Table(GDT), Block Bitmap, Inode Bitmap, Inode Table, Data의 구조로 구성되어 있습니다.

 

EXT2, 정식 이름은 Second Extended File System입니다. 이 파일 시스템은 ext의 문제를 해결하기 위해 나온 파일 시스템입니다.

ext2 파일 시스템은 255자까지의 긴 파일 이름을 지원합니다. ext2 파일 시스템은 세 타임스탬프를 지원하며, 확장이 쉽습니다. 그리고 ext에 있었던 여러 단점(분리 접근, 아이노트 수정 등 지원 안 함)도 개선되었습니다. 파일 시스템의 최대 크기는 블록 사이즈에 따라 2 TiB ~ 32 TiB이며, 서브 디렉터리 개수 제한은 32768개입니다.

EXT3ext2에 저널링 파일 시스템, 큰 디렉터리를 위한 HTree 인덱싱 등의 기능이 추가되었습니다. ext3는 ext2를 바탕으로 만들었기 때문에, ext2 파일 시스템을 자료 손실 없이 ext3 파일 시스템으로 바꿀 수 있습니다.

 

EXT4

64비트 기억 공간 제한을 없애고 ext3의 성능을 향상하며, 하위 호환성이 있는 확장 버전으로서, 많은 부분이 본래, 러스터 파일 시스템을 위해 클러스터 파일 시스템스사에서 개발되었습니다. 여러가지 장점이 있지만 너무 길기 때문에 작성하지 않겠습니다.

 

JFFS(Journalling Flash File System)

파일 시스템에 반영될 변경 사항을 주기적으로 로그로 남겨 비정상 종료가 발생하면 저널은 저장되지 않은 정보를 복구하기 위한 검사 지점으로 사용되어 파일 시스템 메타자료 손상을 막아줍니다.

즉, 일정부분을 기록을 위해 남겨두고, 그 부분에 기록을 남겨 백업 및 복구 능력이 있는 파일 시스템을 말하며,

시스템 충돌 후에 파일시스템 복구에 드는 시간이 획기적으로 줄어듭니다.

 

JFFS2

이름부터 JFFS2 인 만큼 JFFS에서 여러가지 새로운 점이 추가가 되었습니다.

1. NAND 플래시 지원

2. zlib, rubin, rtime 이 세 종류 압축 알고리즘 지원

3. 성능 향상

 

YAFFS(Yet Another Flash File System)

NAND 플래시를 위해서 설계된 파일시스템 입니다.

JFFS가 모든 페이지에 대해서 데이터를 읽어야 한다는 초기화 알고리즘의 단점을 극복하기 위해 파일의 메타데이터인 아이노드를 한 페이지에 저장하는 방법을 사용하고 있습니다.

 

UBIFS(UBI File System)

F2FS(Flash-Friendly File System)

LogFS

등이 있습니다.

728x90

+ Recent posts