Skip to content

Max's Blog

  • Home
  • About
Max's Blog

Category: Debugging & Memory

September 11, 2025 max-sperling

Calling conventions – System V AMD64 vs. Microsoft x64

General Calling conventions specify the low-level details for function calls. They are a part of an ABI. Comparison System V

Continue reading
August 29, 2025 max-sperling

Example of a found HW issue

Coredump Reasoning It fails to get the value at “0x4(%r8)”, because it’s outside the own memory segments. The value of

Continue reading
June 16, 2025 max-sperling

PLT and GOT for shared libs (ELF)

Introduction With static linking, the position of the code of the static libs are exactly known during compile time. This

Continue reading
June 13, 2025 max-sperling

Print stack frames (GDB)

Scenario Application code Print frame script Analysis GDB session Frame 0 0x7fffffffe240: 0x0000555555554040 0x0000000300000008 0x7fffffffe250: 0x0000000000000000 0x0000000b00000000 0x7fffffffe260: 0x00007fffffffe280 0x000055555555518e

Continue reading
May 26, 2025 max-sperling

Conditional breakpoints (C++)

Showcase Debugging $ g++ -g main.cpp $ gdb a.out (gdb) b main.cpp:5 if i == 5 Breakpoint 1 at 0xa24:

Continue reading
January 22, 2025 max-sperling

FlameGraph (Docker)

Setup Get FlameGraph repo % git clone https://github.com/brendangregg/FlameGraph fg Create Docker image Follow the instructions here: C++ develop container (Docker)

Continue reading
December 17, 2024 max-sperling

Pretty printer – Own type

Example code Without pretty printer (gdb) b 29 (gdb) r Breakpoint 1, main () at main.cpp:29 29 return 0; (gdb)

Continue reading
December 16, 2024 max-sperling

Stack unwinding

Mechanism 1. Frame pointers … the old default way Frame pointers are enabled by default. Strong optimization (“-O2”, “-O3”) will

Continue reading
October 26, 2024 max-sperling

Basic assembler instructions (x64, A64)

Instructions Purpose x64 (Intel flavor) A64 Copy content (dst = src) MOV RAX, RBX MOV X0, X1 Copy content (dst

Continue reading
March 27, 2024 max-sperling

Layout of std::string (libstdc++)

Source code Analysis $ g++ –version g++ (Ubuntu 13.2.0-4ubuntu3) 13.2.0 $ g++ main.cpp -g $ gdb a.out (gdb) b 7

Continue reading

Posts navigation

1 2 3 Next Posts»

Categories

  • Other (19)
    • Games (13)
    • Nutrition (4)
    • Traveling (2)
  • Science (17)
    • Chemistry (3)
    • Linguistics (2)
    • Math (10)
    • Physics (2)
  • Sport (73)
    • Climbing (5)
    • Diving (20)
    • Fitness (8)
    • Martial arts (34)
      • Ground fighting (9)
      • Mixed martial arts (4)
      • Stand-up fighting (12)
    • Running (1)
    • Surfing (2)
    • Swimming (1)
    • Volleyball (2)
  • Technology (289)
    • Computer (259)
      • Architecture & Design (15)
      • Artificial intelligence (3)
      • Audio & Video (11)
      • Building & Reversing (15)
        • CMake (2)
      • Computational complexity (3)
      • Computer architecture (4)
      • Debugging & Memory (29)
      • Development (72)
        • CI/CD (1)
        • Programming (61)
          • Concurrency (12)
          • Data structures (13)
          • Pointers & References (7)
        • Scripting (4)
        • Testing (6)
      • Development process (5)
      • Hacking & Security (17)
      • Hardware & Protocols (8)
      • Networking (11)
      • Operating system (22)
        • Linux (13)
        • Windows (8)
      • Regular expression (2)
      • Tool configuration (5)
      • Version control (22)
      • Virtualization (7)
      • Web (29)
    • Electrics (9)
    • Mechanics (15)
    • Medicine (2)
    • Photography (4)
WordPress Theme: Wellington by ThemeZee.