Close Menu
    DevStackTipsDevStackTips
    • Home
    • News & Updates
      1. Tech & Work
      2. View All

      Tenable updates Vulnerability Priority Rating scoring method to flag fewer vulnerabilities as critical

      July 24, 2025

      Google adds updated workspace templates in Firebase Studio that leverage new Agent mode

      July 24, 2025

      AI and its impact on the developer experience, or ‘where is the joy?’

      July 23, 2025

      Google launches OSS Rebuild tool to improve trust in open source packages

      July 23, 2025

      EcoFlow’s new portable battery stations are lighter and more powerful (DC plug included)

      July 24, 2025

      7 ways Linux can save you money

      July 24, 2025

      My favorite Kindle tablet just got a kids model, and it makes so much sense

      July 24, 2025

      You can turn your Google Photos into video clips now – here’s how

      July 24, 2025
    • Development
      1. Algorithms & Data Structures
      2. Artificial Intelligence
      3. Back-End Development
      4. Databases
      5. Front-End Development
      6. Libraries & Frameworks
      7. Machine Learning
      8. Security
      9. Software Engineering
      10. Tools & IDEs
      11. Web Design
      12. Web Development
      13. Web Security
      14. Programming Languages
        • PHP
        • JavaScript
      Featured

      Blade Service Injection: Direct Service Access in Laravel Templates

      July 24, 2025
      Recent

      Blade Service Injection: Direct Service Access in Laravel Templates

      July 24, 2025

      This Week in Laravel: NativePHP Mobile and AI Guidelines from Spatie

      July 24, 2025

      Retrieve the Currently Executing Closure in PHP 8.5

      July 24, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured

      FOSS Weekly #25.30: AUR Poisoned, Linux Rising, PPA Explained, New Open Source Grammar Checker and More

      July 24, 2025
      Recent

      FOSS Weekly #25.30: AUR Poisoned, Linux Rising, PPA Explained, New Open Source Grammar Checker and More

      July 24, 2025

      How to Open Control Panel in Windows 11

      July 24, 2025

      How to Shut Down Windows 11

      July 24, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»Learning Resources»Debugging and Profiling Linux Applications with GDB and strace

    Debugging and Profiling Linux Applications with GDB and strace

    April 24, 2025
    Debugging and Profiling Linux Applications with GDB and strace
    by George Whittaker

    Debugging and profiling are critical skills in a developer’s toolbox, especially when working with low-level system applications. Whether you’re tracking down a segmentation fault in a C program or understanding why a daemon fails silently, mastering tools like GDB (GNU Debugger) and strace can dramatically improve your efficiency and understanding of program behavior.

    In this guide, we’ll dive deep into these two powerful tools, exploring how they work, how to use them effectively, and how they complement each other in diagnosing and resolving complex issues.

    The Essence of Debugging and Profiling

    What is Debugging?

    Debugging is the systematic process of identifying, isolating, and fixing bugs—errors or unexpected behaviors in your code. It’s an integral part of development that ensures software quality and stability. While high-level languages may offer interactive debuggers, compiled languages like C and C++ often require robust tools like GDB for line-by-line inspection.

    What is Profiling?

    Profiling, on the other hand, is about performance analysis. It helps you understand where your application spends time, which functions are called frequently, and how system resources are being utilized. While GDB can aid in debugging, strace provides a view of how a program interacts with the operating system, making it ideal for performance tuning and root cause analysis of runtime issues.

    Getting Hands-On with GDB

    What is GDB?

    GDB is the standard debugger for GNU systems. It allows you to inspect the internal state of a program while it’s running or after it crashes. With GDB, you can set breakpoints, step through code, inspect variables, view call stacks, and even modify program execution flow.

    Preparing Your Program

    To make your program debuggable with GDB, compile it with debug symbols using the -g flag:

    gcc -g -o myapp myapp.c

    This embeds symbol information like function names, variable types, and line numbers, which are essential for meaningful debugging.

    Basic GDB Commands

    Here are some fundamental commands you’ll use frequently:

    gdb ./myapp # Start GDB with your program run # Start the program inside GDB break main # Set a breakpoint at the 'main' function break filename:line# Break at specific line next # Step over a function step # Step into a function continue # Resume program execution print varname # Inspect the value of a variable backtrace # Show the current function call stack quit # Exit GDB

    Go to Full Article

    Source: Read More

    Facebook Twitter Reddit Email Copy Link
    Previous ArticleLazarus Hits 6 South Korean Firms via Cross EX, Innorix Zero-Day and ThreatNeedle Malware
    Next Article Debian Package Management: Aptitude vs. Apt-Get in Ubuntu

    Related Posts

    Learning Resources

    FOSS Weekly #25.30: AUR Poisoned, Linux Rising, PPA Explained, New Open Source Grammar Checker and More

    July 24, 2025
    Learning Resources

    What I learned from Inspired

    July 24, 2025
    Leave A Reply Cancel Reply

    For security, use of Google's reCAPTCHA service is required which is subject to the Google Privacy Policy and Terms of Use.

    Continue Reading

    Phonetically-Augmented Discriminative Rescoring for Voice Search Error Correction

    Machine Learning

    Fortinet Warns Attackers Retain FortiGate Access Post-Patching via SSL-VPN Symlink Exploit

    Development
    Managed Service Offering (MSO) Support Ticketing System

    Managed Service Offering (MSO) Support Ticketing System

    Development

    Here’s how I’d design a mega menu — with 3 great examples

    Web Development

    Highlights

    CVE-2025-52989 – Juniper Networks Junos OS and Junos OS Evolved Delimiter Injection Vulnerability

    July 11, 2025

    CVE ID : CVE-2025-52989

    Published : July 11, 2025, 4:15 p.m. | 4 hours, 50 minutes ago

    Description : An Improper Neutralization of Delimiters vulnerability in the UI of Juniper Networks Junos OS and Junos OS Evolved allows a local, authenticated attacker with high privileges to modify the system configuration.

    A user with limited configuration and commit permissions, using a specifically crafted annotate configuration command, can change any part of the device configuration.

    This issue affects:

     Junos OS: 

    * all versions before 22.2R3-S7,
    * 22.4 versions before 22.4R3-S7,
    * 23.2 versions before 23.2R2-S4,
    * 23.4 versions before 23.4R2-S4,
    * 24.2 versions before 24.2R2-S1,
    * 24.4 versions before 24.4R1-S2, 24.4R2;

    Junos OS Evolved:

    * all versions before 22.4R3-S7-EVO,
    * 23.2-EVO versions before 23.2R2-S4-EVO,
    * 23.4-EVO versions before 23.4R2-S5-EVO, 
    * 24.2-EVO versions before 24.2R2-S1-EVO

    * 24.4-EVO versions before 24.4R2-EVO.

    Severity: 5.1 | MEDIUM

    Visit the link for more details, such as CVSS details, affected products, timeline, and more…

    CVE-2025-20965 – Samsung Bixby Unauthenticated Data Access Vulnerability

    May 7, 2025

    CVE-2025-3468 – NEX-Forms Stored Cross-Site Scripting Vulnerability

    May 8, 2025

    CVE-2025-22233 – Spring Framework Disallowed Fields Bypass Vulnerability

    May 16, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.