SlideShare a Scribd company logo
2
Most read
4
Most read
5
Most read
GDB + GDB Server
via socat
by Wei-Chung Wen
@ 2015-05-15
Overall Sequence
1. Start socat as proxy
2. Start GDB server
a. GDB server hangs until GDB connects
b. No way to stop GDB server
3. Start GDB
4. Configure GDB sysroot
5. Connect GDB to socat
6. Debug
7. Exit GDB
a. GDB server automatically stops
b. socat automatically stops
socat
● Multipurpose relay (SOcket CAT)
● We use it as a proxy bridging GDB on build
server and GDB server on BMC
● socat command
○ Template: socat FROM TO
○ Template: socat TCP4-LISTEN:5566 TCP4:
192.168.1.100:5566
GDB Server
● GDB server ~ 263KB
○ An agent complying with GDB’s instruction to debug
programs
● GDB server command
○ Template: gdbserver :PORT CMD ARGS
○ Example: gdbserver :5566 /sbin/fullfw
GDB
● GDB ~ 4.2MB
● GDB command
○ Template: gdb CMD ARGS
○ Example: gdb build/rootfs/sbin/fullfw
● Internal comman for debugging via GDB
server
○ set sysroot build/rootfs
○ target remote 192.168.1.100:5566
Demo and FAQ

More Related Content

PDF
Fcsi601 Linux Firewall Nat
PPT
ieee 802.11n
PPTX
Apache Zookeeper Explained: Tutorial, Use Cases and Zookeeper Java API Examples
PPTX
Openflow Protocol
PPTX
DNS Exfiltration and Out-of-bound attacks
ODP
Gluster technical overview
PDF
Advanced computer network lab manual (practicals in Cisco Packet tracer)
PDF
Dhcp & dhcp relay agent in cent os 5.3
Fcsi601 Linux Firewall Nat
ieee 802.11n
Apache Zookeeper Explained: Tutorial, Use Cases and Zookeeper Java API Examples
Openflow Protocol
DNS Exfiltration and Out-of-bound attacks
Gluster technical overview
Advanced computer network lab manual (practicals in Cisco Packet tracer)
Dhcp & dhcp relay agent in cent os 5.3

What's hot (20)

PPTX
OpenStack Networking
PDF
Les réseaux informatiques 3
PDF
CS6003 AD HOC AND SENSOR NETWORKS
PDF
TFTP - Trivial File Transfer Protocol
PPTX
PPTX
Getting started with YANG
PDF
Routing Protocols for Wireless Sensor Networks
PPTX
WSN presentation
PPTX
Overview of Distributed Virtual Router (DVR) in Openstack/Neutron
PPTX
Congestion control algorithms.pptx
PPTX
OVN DBs HA with scale test
PPTX
Boost Your Neo4j with User-Defined Procedures
PDF
Openstack 101
PPTX
Zookeeper Architecture
PPTX
IPv6 Addressing Architecture
PPTX
Module 3: NETCONF and YANG Concepts
PPTX
Hadoop Meetup Jan 2019 - Overview of Ozone
PDF
Chapter 5 IoT Design methodologies
PDF
IP Routing
PDF
IEEE 802 Standard for Computer Networks
OpenStack Networking
Les réseaux informatiques 3
CS6003 AD HOC AND SENSOR NETWORKS
TFTP - Trivial File Transfer Protocol
Getting started with YANG
Routing Protocols for Wireless Sensor Networks
WSN presentation
Overview of Distributed Virtual Router (DVR) in Openstack/Neutron
Congestion control algorithms.pptx
OVN DBs HA with scale test
Boost Your Neo4j with User-Defined Procedures
Openstack 101
Zookeeper Architecture
IPv6 Addressing Architecture
Module 3: NETCONF and YANG Concepts
Hadoop Meetup Jan 2019 - Overview of Ozone
Chapter 5 IoT Design methodologies
IP Routing
IEEE 802 Standard for Computer Networks
Ad

Similar to Gdb + gdb server + socat (20)

PDF
Writing mruby Debugger
PDF
Managing and Visualizing your Replication Topologies with Orchestrator
PDF
Gdb remote debugger
PPTX
Free5 gc installation
PDF
Continuous integration with docker, buildbot and git
PDF
Debugging embedded devices using GDB
PDF
Debug C/C++ Programs More Comfortably @ 2014.12.14 Trace Code Meetup
PDF
Nimble - iOS dependency management
PDF
Deployment made easy with Git
PPTX
CI/CD with Bitbucket pipelines
PDF
Ctrl-C redesign for gcc cauldron in 2022 in prague
PDF
WPEWebKit, the WebKit port for embedded platforms (Linaro Connect San Diego 2...
PDF
WPE, a New WebKit Port Optimised for Embedded (IBC 2017)
PDF
Functional MCU programming
PDF
SPDY and What to Consider for HTTP/2.0
PDF
JBoss EAP 7 & JDG 7 최신 기술 소개
PDF
Let's trace Linux Lernel with KGDB @ COSCUP 2021
PPTX
Mumbai MuleSoft Meetup #17 - GraphQL
PDF
ELC-E Linux Awareness
Writing mruby Debugger
Managing and Visualizing your Replication Topologies with Orchestrator
Gdb remote debugger
Free5 gc installation
Continuous integration with docker, buildbot and git
Debugging embedded devices using GDB
Debug C/C++ Programs More Comfortably @ 2014.12.14 Trace Code Meetup
Nimble - iOS dependency management
Deployment made easy with Git
CI/CD with Bitbucket pipelines
Ctrl-C redesign for gcc cauldron in 2022 in prague
WPEWebKit, the WebKit port for embedded platforms (Linaro Connect San Diego 2...
WPE, a New WebKit Port Optimised for Embedded (IBC 2017)
Functional MCU programming
SPDY and What to Consider for HTTP/2.0
JBoss EAP 7 & JDG 7 최신 기술 소개
Let's trace Linux Lernel with KGDB @ COSCUP 2021
Mumbai MuleSoft Meetup #17 - GraphQL
ELC-E Linux Awareness
Ad

Recently uploaded (20)

PDF
Nekopoi APK 2025 free lastest update
PPTX
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
PPTX
Advanced SystemCare Ultimate Crack + Portable (2025)
PDF
AutoCAD Professional Crack 2025 With License Key
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
CapCut Video Editor 6.8.1 Crack for PC Latest Download (Fully Activated) 2025
DOCX
Greta — No-Code AI for Building Full-Stack Web & Mobile Apps
PDF
Digital Systems & Binary Numbers (comprehensive )
PDF
Complete Guide to Website Development in Malaysia for SMEs
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PPTX
CHAPTER 2 - PM Management and IT Context
PPTX
Patient Appointment Booking in Odoo with online payment
PDF
How AI/LLM recommend to you ? GDG meetup 16 Aug by Fariman Guliev
PDF
Autodesk AutoCAD Crack Free Download 2025
PDF
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
PPTX
Oracle Fusion HCM Cloud Demo for Beginners
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PPTX
Computer Software and OS of computer science of grade 11.pptx
PPTX
Why Generative AI is the Future of Content, Code & Creativity?
Nekopoi APK 2025 free lastest update
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
Advanced SystemCare Ultimate Crack + Portable (2025)
AutoCAD Professional Crack 2025 With License Key
wealthsignaloriginal-com-DS-text-... (1).pdf
Design an Analysis of Algorithms II-SECS-1021-03
CapCut Video Editor 6.8.1 Crack for PC Latest Download (Fully Activated) 2025
Greta — No-Code AI for Building Full-Stack Web & Mobile Apps
Digital Systems & Binary Numbers (comprehensive )
Complete Guide to Website Development in Malaysia for SMEs
Odoo Companies in India – Driving Business Transformation.pdf
CHAPTER 2 - PM Management and IT Context
Patient Appointment Booking in Odoo with online payment
How AI/LLM recommend to you ? GDG meetup 16 Aug by Fariman Guliev
Autodesk AutoCAD Crack Free Download 2025
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
Oracle Fusion HCM Cloud Demo for Beginners
Navsoft: AI-Powered Business Solutions & Custom Software Development
Computer Software and OS of computer science of grade 11.pptx
Why Generative AI is the Future of Content, Code & Creativity?

Gdb + gdb server + socat

  • 1. GDB + GDB Server via socat by Wei-Chung Wen @ 2015-05-15
  • 2. Overall Sequence 1. Start socat as proxy 2. Start GDB server a. GDB server hangs until GDB connects b. No way to stop GDB server 3. Start GDB 4. Configure GDB sysroot 5. Connect GDB to socat 6. Debug 7. Exit GDB a. GDB server automatically stops b. socat automatically stops
  • 3. socat ● Multipurpose relay (SOcket CAT) ● We use it as a proxy bridging GDB on build server and GDB server on BMC ● socat command ○ Template: socat FROM TO ○ Template: socat TCP4-LISTEN:5566 TCP4: 192.168.1.100:5566
  • 4. GDB Server ● GDB server ~ 263KB ○ An agent complying with GDB’s instruction to debug programs ● GDB server command ○ Template: gdbserver :PORT CMD ARGS ○ Example: gdbserver :5566 /sbin/fullfw
  • 5. GDB ● GDB ~ 4.2MB ● GDB command ○ Template: gdb CMD ARGS ○ Example: gdb build/rootfs/sbin/fullfw ● Internal comman for debugging via GDB server ○ set sysroot build/rootfs ○ target remote 192.168.1.100:5566