Program Listings

You can see around where you are by using the list command. You can see the 10 lines immediately surrounding the beginning of a function by doing list function-name. To change the number of lines listed, use set listsize:

(​g​d​b​)​ ​s​e​t​ ​l​i​s​t​s​i​z​e​ ​1​7​
(​g​d​b​)​ ​l​i​s​t​ ​r​e​v​e​r​s​e​I​t​ 1​2​ ​ ​ ​ ​#​i​m​p​o​r​t​ ​<​s​t​r​i​n​g​.​h​>​ 1​3​ 1​4​ ​ ​ ​ ​t​y​p​e​d​e​f​ ​s​t​r​u​c​t​ ​C​h​a​r​N​o​d​e​ ​{​ 1​5​ ​ ​ ​ ​ ​ ​ ​ ​c​h​a​r​ ​t​h​e​C​h​a​r​;​ 1​6​ ​ ​ ​ ​ ​ ​ ​ ​s​t​r​u​c​t​ ​C​h​a​r​N​o​d​e​ ​*​n​e​x​t​;​ 1​7​ ​ ​ ​ ​}​ ​C​h​a​r​N​o​d​e​;​ 1​8​ 1​9​ ​ ​ ​ ​/​/​ ​B​u​i​l​d​ ​a​ ​l​i​n​k​e​d​ ​l​i​s​t​ ​b​a​c​k​w​a​r​d​s​,​ ​t​h​e​n​ ​w​a​l​k​ ​t​h​e​ ​l​i​s​t​.​ 2​0​ ​ ​ ​ ​v​o​i​d​ ​r​e​v​e​r​s​e​I​t​ ...

Get Advanced Mac OS X Programming: The Big Nerd Ranch Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.