Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 431045
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T19:56:08+00:00 2026-05-12T19:56:08+00:00

My gdb is GNU gdb Red Hat Linux (6.3.0.0-1.162.el4rh) and I can’t debug templates.

  • 0

My gdb is GNU gdb Red Hat Linux (6.3.0.0-1.162.el4rh) and I can’t debug templates. How can I debug templates with this debugger?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T19:56:08+00:00Added an answer on May 12, 2026 at 7:56 pm

    if your problem is just about placing breakpoint in your code. Here is a little snippet

    ex: main.cpp

    #include <iostream>
    
    template <typename T>
    void coin(T v)
    {
        std::cout << v << std::endl;
    }
    
    template<typename T>
    class Foo
    {
    public:
    
        T bar(T c)
        {
            return c * 2;
        }
    };
    
    int main(int argc, char** argv)
    {
        Foo<int> f;
        coin(f.bar(21));
    }
    

    compile with
    g++ -O0 -g main.cpp

    gdb ./a.out
    (gdb) b Foo<int>::bar(int)
    Breakpoint 2 at 0x804871d: file main.cpp, line 16.
    (gdb) b void coin<int>(int)
    Breakpoint 1 at 0x804872a: file main.cpp, line 6.
    (gdb) r
    ... debugging start
    

    otherwise you could just use

    (gdb) b main.cpp:16
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

gcc (GCC) 4.1.2 c89 Red Hat Enterprise Linux Server release 5.4 2.6.18-164.el5 GNU gdb
When I debug an app on a device I get this: GNU gdb 6.3.50-20050815
GNU gdb Fedora (6.8-37.el5) Kernal 2.6.18-164.el5 I am trying to debug my application. However,
Whenever I build+run my program, it displays all this extra stuff: GNU gdb 6.3.50-20050815
I've been trying to make GNU gdb 6.5-14 to use the source code embedded
I am currently running gdb version 6.7.1 on Ubuntu Linux, and working in a
when I start GDB, I get the following error message in debugger: input:--- token
I'm getting this every time I attempt to debug my app in the simulator:
XCode Error: GNU gdb 6.3.50-20050815 (Apple version gdb-1708) (Mon Aug 8 20:32:45 UTC 2011)
I'm debug-running a daemon application in foreground mode inside gdb inside a tmux session.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.