Sponsored Content
Top Forums UNIX for Dummies Questions & Answers unable to display the souce line in gdb Post 302114961 by tantric on Thursday 19th of April 2007 08:10:46 PM
Old 04-19-2007
Hi, does anyone know how can I skip a loop 'n' number of times in gdb.

For e.g:

for (i= 0; i< 100; i++) {
...
}

Lets say I am single stepping the program and I reach this loop. Now I want to skip running the loop 10 times. (I do not want to single step inside the loop for the first 10 iterations)

Can I do that ?

Thank you !!
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

xhost unable to open display

I am trying to install ORACLE 10g database on HP-UNIX 11.11 I am running OUI runinstaller from exceed terminal from windows PC. I have set DISPLAY=IPAddress of PC:0.0 When installer starts it is giving me error of display (5 Replies)
Discussion started by: ymg
5 Replies

2. Programming

Incorrect address display by GDB

Hi, On using GDB debugger on different executables, the address displayed for the symbols seem incorrect, as it shows me the same address in each prorgram, run simultaneoulsy. eg: Program: linkmain1.c Breakpoint 1, main () at linkmain1.c:14 14 printf("In linkmain1.c\n"); (gdb)... (0 Replies)
Discussion started by: karthikb23
0 Replies

3. Shell Programming and Scripting

Unable to display correctly the contents of a file without a line feed

I am using AIX and ksh. I need to display the contents of a file that has a pid (process id). Because the file is open, it doesn't have the line feed or new line, so for some reason if I do this: `cat $pid` , where $pid is the name of the fully qualified file, it displays test3.sh: 426110:... (1 Reply)
Discussion started by: Gato
1 Replies

4. Programming

gdb: how to debug an executable file with a few command line papameters

If an executalbe file has several parameters, gdb can not pass parameters correctly. Let us see: run: ./executablefile1 agr1 arg2 arg3 debug: gdb executablefile1 run executalbefile1 arg1 arg2 arg3 then argv : executablefile1 argv : executablefile argv : arg1 ... (3 Replies)
Discussion started by: cdbug
3 Replies

5. Shell Programming and Scripting

Copy a file by creating folder structure in destination as in Souce

Hello, i am having a source directory which consist of multiple sub directories and my destination folder is a empty directory. if try to copy a file source->test->1.txt from source to destination test2 using the commaind. cp source/test/1.txt desti/ It will copy the 1.txt under desti... (1 Reply)
Discussion started by: tsaravanan
1 Replies

6. Programming

GDB No line in file error

Hi, I have a c program i compile with gcc4.5. This elf, if I use gdb and put a breakpoint on main, instead has a breakpoint in a function other than main or says no line in file. I verified the elf is 1 to 1 with source, have all debug symbols for compilation etc. The problem I think is the... (2 Replies)
Discussion started by: dragonpoint
2 Replies

7. Linux

unable to read core dumps on unix. Is there another way than using GDB?

hi all, I am having set of core dumps obtained from client server. Now i am trying to read them but unable to do so. I have few queries: 1. Core dumps were generated on some xyz server and copied to my unix virtual. Can I read them as text here? 2. I tried installing gdb-7.3 but when i fire... (0 Replies)
Discussion started by: suyogs
0 Replies

8. Programming

Why does gdb stop at a different line than “i b” shows while returning from function?

Here is the program I am trying to debug: #include <stdio.h> int i = 5; int main(void) { int x = 3; display(x); return 0; } void display(int x) { for ( i=0; i<x; ++i ) { printf("i is %d.\n", i); } }This code is coming from here Peter's gdb Tutorial: Stepping... (2 Replies)
Discussion started by: ijustneeda
2 Replies

9. UNIX for Dummies Questions & Answers

Display Date and Time in GDB

In gdb is there any way we can display date/time in first column while debugging or is there any command which will print date/time? I am asking this just to know when exactly a breakpoint got hit. (6 Replies)
Discussion started by: rupeshkp728
6 Replies

10. UNIX for Dummies Questions & Answers

GDB not showing line details

I have bunch of source code which I compiled using -ggdb3 flag. I have copied the source code and executable to an another machine. When I run the exe in gdb it does not show the statments at the line numbers when it breaks. This is what I see Breakpoint 1, TestCode (handler=0x806e110,... (1 Reply)
Discussion started by: rupeshkp728
1 Replies
GLUBEGINTRIM(3G)														  GLUBEGINTRIM(3G)

NAME
gluBeginTrim, gluEndTrim - delimit a NURBS trimming loop definition C SPECIFICATION
void gluBeginTrim( GLUnurbs* nurb ) void gluEndTrim( GLUnurbs* nurb ) PARAMETERS
nurb Specifies the NURBS object (created with gluNewNurbsRenderer). DESCRIPTION
Use gluBeginTrim to mark the beginning of a trimming loop, and gluEndTrim to mark the end of a trimming loop. A trimming loop is a set of oriented curve segments (forming a closed curve) that define boundaries of a NURBS surface. You include these trimming loops in the defini- tion of a NURBS surface, between calls to gluBeginSurface and gluEndSurface. The definition for a NURBS surface can contain many trimming loops. For example, if you wrote a definition for a NURBS surface that resem- bled a rectangle with a hole punched out, the definition would contain two trimming loops. One loop would define the outer edge of the rec- tangle; the other would define the hole punched out of the rectangle. The definitions of each of these trimming loops would be bracketed by a gluBeginTrim/gluEndTrim pair. The definition of a single closed trimming loop can consist of multiple curve segments, each described as a piecewise linear curve (see gluPwlCurve) or as a single NURBS curve (see gluNurbsCurve), or as a combination of both in any order. The only library calls that can appear in a trimming loop definition (between the calls to gluBeginTrim and gluEndTrim) are gluPwlCurve and gluNurbsCurve. The area of the NURBS surface that is displayed is the region in the domain to the left of the trimming curve as the curve parameter increases. Thus, the retained region of the NURBS surface is inside a counterclockwise trimming loop and outside a clockwise trimming loop. For the rectangle mentioned earlier, the trimming loop for the outer edge of the rectangle runs counterclockwise, while the trimming loop for the punched-out hole runs clockwise. If you use more than one curve to define a single trimming loop, the curve segments must form a closed loop (that is, the endpoint of each curve must be the starting point of the next curve, and the endpoint of the final curve must be the starting point of the first curve). If the endpoints of the curve are sufficiently close together but not exactly coincident, they will be coerced to match. If the endpoints are not sufficiently close, an error results (see gluNurbsCallback). If a trimming loop definition contains multiple curves, the direction of the curves must be consistent (that is, the inside must be to the left of all of the curves). Nested trimming loops are legal as long as the curve orientations alternate correctly. If trimming curves are self-intersecting, or intersect one another, an error results. If no trimming information is given for a NURBS surface, the entire surface is drawn. EXAMPLE
This code fragment defines a trimming loop that consists of one piecewise linear curve, and two NURBS curves: gluBeginTrim(nobj); gluPwlCurve(..., GLU_MAP1_TRIM_2); gluNurbsCurve(..., GLU_MAP1_TRIM_2); gluNurbsCurve(..., GLU_MAP1_TRIM_3); gluEndTrim(nobj); SEE ALSO
gluBeginSurface, gluNewNurbsRenderer, gluNurbsCallback, gluNurbsCurve, gluPwlCurve GLUBEGINTRIM(3G)
All times are GMT -4. The time now is 12:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy