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 9310785
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T01:12:05+00:00 2026-06-19T01:12:05+00:00

I have an OpenGL library bug I’m trying to trace, and the bug prints

  • 0

I have an OpenGL library bug I’m trying to trace, and the bug prints out something that looks like C code into stdout. This is the program, and the bug occurs as soon as glutMainLoop() is called, but I suspect that it’s not that function that is faulty. How would I go tracing what function wrote to stdout?

As per request, the output:

arc_ccw_turn, p = 0
case b
arc_ccw_turn, p = 0
case d
arc_ccw_turn, p = 0
case a
arc_ccw_turn, p = 0
case c

I’ve reported the bug already, but I’d try and provide a GDB backtrace for the issue too.

  • 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-06-19T01:12:06+00:00Added an answer on June 19, 2026 at 1:12 am

    If you are using Linux then set a breakpoint on write(), all output to stdout and stderr eventually goes through this function. The following is for x86-64, for other architectures you would need to change register names:

    $ gdb /usr/bin/cat
    Reading symbols from /usr/bin/cat...(no debugging symbols found)...done.
    (gdb) set args /proc/cpuinfo
    (gdb) b write
    Breakpoint 1 at 0x401740
    (gdb) condition 1 ($rdi == 1 || $rdi == 2)
    (gdb) display $rdi
    (gdb) display $rsi
    (gdb) display $rdx
    (gdb) r
    Starting program: /usr/bin/cat /proc/cpuinfo
    3: $rdx = 3368
    2: $rsi = 6348800
    1: $rdi = 1
    (gdb) p (char*)$rsi
    $4 = 0x60e000 "processor\t: 0\nvendor_id\t: GenuineIntel\ncpu family\t: 6\nmodel\t\t: 30\nmodel name\t: Intel(R) Core(TM) i7 CPU         870  @ 2.93GHz\nstepping\t: 5\nmicrocode\t: 0x5\ncpu MHz\t\t: 1199.000\ncache size\t: 8192 KB\nphy"...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a SWT app that opens a OpenGL window (using the LWJGL library)
I have a basic library that I use to paint OpenGL text and when
I have some simple OpenGL ES code in C++ that I've run on a
I have included the opengl.framework and glut.framework from /systems/library/framework into my xcode project. However
I have an OpenGL application that outputs stereoscopic 3D video to off-the-shelf TVs via
So I have some openGL code (such code for example) /* FUNCTION: YCamera ::
Here's the basic situation: I have an OpenGL VBO that draws a 2D symbol
This is hopefully a simple question: I have an OpenGL texture and would like
I have a library, which is engaged in rendering on opengl and prinimaet streams
I have this simple code #include <stdio.h> #include <OpenGL/glext.h> #include <OpenGL/gl.h> int main (int

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.