• Aucun résultat trouvé

INTERNATIONAL SUPPORT 8- and 16-bit data, 8-bit filenames

Dans le document HP-UX Reference (Page 107-134)

Hewlett-Packard Company - 1 - Version B.l, October 1986

CAT(l)

SYNOI'Sl~~

(at

CAT(ll

DESC1UPTIGN

Cat reads each jile m ~l'q,~CJH't' an,j w! :tcs it ()D tbe ELmJard ouqnt, I iJ~l-·:

'1 SEE ALSO WAR.Nll'CG

--·u C;L1~'-{'~:. :)"\:tP':T t~! he ~,1Db~lfft'red (charartrr-hy·-ct!'lr3.ctof!" I1 ;r:~~an,.'. outp:Jt :,;:;

hliifere:-~

- ;:; !:laX"E (\It slkw ::J,')i)ut nOD-(~xist{'nt ~li.'~. idt~ltlr.tl illpm Hid Oi'.t put. and wTitt'

\.'rr·Jr:- ~,Tf)rHJii.l1y, nu input f)k~ Jna~v h~' th(· ~.:1.P'~(~ rl.~ t~~.t; :F;ti)~lt ~r;!' !JnJ('~~'3 it is a

S;jf{ 1al Gle (1'L,:: 4"213~~I) C.t1t -8 f":.:d.ttrc lS prft;<i{:c:~l ~j}" ,-;5i1( 1,1.)

-v 1';"''',"0' rW:l-printillg ch:tnet,cfs \v'iJtb the ('xccptinll \)f :aLIS. ncw-ime~ auel foEd-tf"t',hi tu he printd. visibi:/. (,mim! ehara<:ins an· pri:lt,·'} . X ((.m~lol-X); th~;

.;)I<L ~Jlara('tf! C)( t-,1d q177\ i~. rr!;~t:od A?, :'J')~.)-}\:--:.{ 'II Ch:1L.-H 1'·r'~' (~\\ l1 h th(\ ~l~g~, l)it ~(t'i ;!rp ~!r!Il.t~_·c~ :~~ "t~-}', v.J\c:~'"' :~: 111('- C~l~H~:~\-.tf'r ~Pf"C~~jt--·t-l Ly tJlP SeVf'~1 }:)1"/

'~:n if" r l ,j ~

'--t

__ \':11 W}~f:l 1j'Sfd \vith til{ -v n~)liu;~. {·.tu:-:'f:' ~.l $ ~L'J.ra.·t(l

t.,

~< i-lr!llt~;d a~ trJP e.:-]!j r,f each hi!.' (prwr to Hii' l!tow-L",')

, , , ' r

,.

( .. \.!~ il. nan d ft,r >.~l ~ t,~

~\'t~r'sr~t(~~~ t ~;.t' d.;.1t~1

~,P'::T:;J.J ch.:tr.:.u tf'r~.

!~1:Eil."AT;O:-;AL SCPPOrlT

Hewlett-Packard Company - 1 - Vrr<;ion Bl. October 1986

CB(l) HP-UX CB(1)

NA.ME

ctJ - {' 1'/"ngraJ1J h<'dut ifieL formatter SYNOPSIS

eb ["8 ] [J --i leng- file .,.

DESCRIPT to].,.'

(':' r('3.,t", C~ 1~t(.·i_~1~-~111~ t .. tt!H~r fru!n it~ argL:Illenls c·r frOtIi the ~'1tandard Inptit aild \vrite~ tht"nA O!f lLe ~ta!ld~rd (JUt1-~l!t v'lith ~!Y1('illg :1ud l~:df'nta.tiGr: that disp!c:: .. ys 1}lt\ strl:rtur(~. f~f tile (·pdl~. !Jnder Itdaitlt. (.ptiOl1H, ct' preserv.,s ;,Jl user llpw-liili:S. Under the-s f1,lIT (',Ii c3lHmi~alize8 the code to tlw

J~:,l(.; vi' 1{l.;rL.i~LaL ~,Ed I~,lt(L.~t: 1;j 7~hL (: r"T!Jgr(HTHTtiny L(1.il.y1J.a~e. file -j flag canses spht ialPS to

~,,~ llLt f)dl'k tOjz;;d.her. fhe-l gag cause" cb to ,;pht lines that arc- long-t'r thew leng.

::iEE ALSO cr( l).

BUGS

IKTEE;"\;ATiDl"AL SUPPORT

Hewlett·Pa(kf-tf(~ ('omliany ·1·

CC(l) HP-UX CC(l) before any arguments on the command line. For example (in sh{l) notation),

CCOPTS=-v

The following options are recognized by cc.

-c Suppress the link edit phase of the compilation, and force an object (.o) file to be produced for each .c file even if only one program is compiled. Object files pro-duced from C programs must be linked before being executed.

-C

Cause the compiler to generate additional information needed by the symbolic debugger.

Hewlett-Packard Company - 1 - Version B.l, October 1986

CC(l) routine by one that automatically calls monitor(3C) at the start and arranges to write out a mon.out file at normal termination of execution of the object pro-gram. An execution profile can then be generated by use of pro/(1).

Run only cpp(1) on the named C programs and leave the result on corresponding files suffixed .i.

Cause the output file from the linker to be marked as demand loadable. For details and system defaults, see Id(1).

Cause the output file from the linker to be marked as not demand loadable. For details and system defaults, see Id(1).

Cause the output of the linker to be stripped of symbol table information. The identifitts indicating the subprocess(es). This option works in two modes: 1) if c is a single identifier, name represents the full path name of the new subprocess;

2) if c is a set of identifiers, name represents a prefix to which the standard suffixes are concatenated to construct the full path names of the new sub-processes.

c can take one or more of the values:

p preprocessor (standard suffix is cpp) c compiler body (standard suffix is ccom)

o

same as c

Enable verbose mode, which produces a step-by-step description of the compila-tion process on stderr. Also echoes CCOPTS if it is set.

-w Suppress warning messages.

-W c,argl[,arg2 ... ]

Hand off the argument[s] argi to pass c where c can assume one of the values listed under the -t option as well as d (driver program). The -W option specification allows additional, implementation-specific options to be recognized by the compiler driver. For example, on the Series 300,

-w

d,-x

causes the driver to call various subprocesses needed to generate MC68020 code.

Furthermore, a shorthand notation for this mechanism can be used by placing

" +"

in front of the option name as in

+x

Hewlett-Packard Company - 2 - Version B.1, October 1986

CC(l)

-z

HP-t'X CC(l)

which is (\qltivalt~:lt to t.he prev!ous ()ption (:xa1:n1-)lt:.~. S!JHlf (~~!iln~;'):lljT :J:-:t'd 31~b­

prl}(fs!:! :)pti,/Ils Utll also be abbreviaiul in a simIlar fa"hiOlL l\~oti' tila; [.·f ,;impl!-city. t~:s s!:'.)rt h~Il,J ~-nl!~t be appli~;d tn caell l)ptiO:l iIl;::v~du~~n). O;:t :C~~~~ ~ hrj.t

,::l.n L{" a.b~~'r(;Vl~tlc··~l ~)~i!lg "-f-" arf> iIilple:l1f:ntation-d(?I_)f2:.~ ·~f·r;t . . -i:~d :'l.rr };~~t_~l~

lindfr HAHDV'; Ai.tF DEiT~DENCI[S.

Do :lOt bind anythinv, to address zero. Thi~ option will allcy, rt1l1tilne deLI';( t;.Jll of null p"jlltf!'~. S~'(' HlP noti' on pointcr8 lwIow '

Allow dt'n~fH{,ll('mg ,if udll j)',J;lt(']'S, See the note on ,JomttTf, beicw

Cth ... 'f ;1fg~~L"1ih ar • .' taken L) be ( -C'-'I!Jj"tltJble :ibjeci. pltJgniili~., typically ;If'al. ,.(: ';) ,1:1 ,-:,rl','~

(I f1l~j, p(Thaps lihraries nf C-nElpatih!e wutines" The'll' prn~rams, togcthl'f with the r(':'.ul!~

·-f ,':,;,;! ,li'-'r,'" ':,('('i~~f"~ cq-P liqkpd (ill flo" nr.jPf (J"vprl'l to, pfl')(hllP '1n P'lil'( 'i,,,:,1, l"fP,>:r:lTlJ ,V,l L 11:1' ilaille a.out.

aw! Hitdj(~ C t,''{t, 'lllrl the var:OllS '\ddenaa. to:1 (,Ilmpri<;t'" ~kA ;,v;tiLihk -i'll(' dOCUIliUHS ale iHttntimlaJ!y arnbipwu,; in Sul1lt <1ie:1.'l, HP-t'X ~;wcil;t:" ~Olll{,

c}}",r

T",.' dIal' tY;)f i~ tlt';:j('d as sigll('d hy default. It may be declarni unsig!1f'1

p1'lntf·r~

,\!('\,-',li! -1]1' 1)1>.:((. 'J tt ;..rILL 17('10) pnillttr is tfchIl1cally :J!rv,aL (S(I' K('rnigh;lll d.nd Rltdlie) hut FUil,}' ',:yst,"lflS hrwl' jlNmiHf'd it in thl' past. The folbwing is prllvidcd to m,Lx~~ni~~,~ illlPor-tahili!y dcrJ<i!'. If ~!:e ~u.rdwarf' i~ ahlp tu If turn zt'm for read~ ·Jflocutiull zero (v"hen ::Hces~il1?:

.;;1 JcaSl g. aad 1(;,>';1 :;:n:ATitic;), it lJJU"t du ",) ujJi(',;" tht' -z !bg i~ prt;~(l!t 'nil; ---1.

r·:'·~'.:~·:"t,.; ";~:t~ SIC;~~I"'('<1/

t ~:'Hi '-.CfU fad.), ~}i' 1. ~{ t ~-:C ttd if the -1; fiag

1"

alw:~vs set

ty l't:'s

12 ... :\!;\>~r.t~ed if an '1i'("t~'"~:-: tn }~'~'-at~n:: z~'rq i~ :1r;errl!)!(';1 \\'riT\'~ t'J jt!~

,--~'l rcr...; ~:'V{:l1 if rC'a.d:-; an~: li'".1t. If thL' ll{ll d'N til {; ca" 2.:.I.ut "J.,'::SlJI (' tilLlt

{\ .... rf:iin ~\~'n;:~r~t!:i~ ft:->fp:ij., t-~u:.t.t (~ t?pf' he '; ~rt'(i::(' nnr:-~bpr of hit~. ''1idr It ran \'-'\' :i-~~r17T1Cd that

~til znt ('~11) ~iotd at jfi:.";': ,t." iU\Jt:ll IJllorl~idL.{il1 a~ a ,-~h,)rL and that J. tung cad ~101(1 a.r !t:~J,...~t: ~~ ..

lllllCh iAofmation '2'" <~~1 t:;.i. i\dditicndlly, eithH an in! or a long call Lold a rOll.!rr HARD\VARE DEPLNDENCi:"

\. ' . .., ... t-' J .~;. ~:';1'

+.y.

or ---W d.'\--X 1---i'- ,_,r -'ll d, -:\.

(';..i:l::-·t"~ lj;( l':l1l!)!~~~ t 6{·Lf'r1~t· b(;:H~I~l :'.fC",8{)ld ( ".I.' l

, . ,

.:11 \ '; .... ..?'t'c't l~r.lJ

H("wktt-P:v.'Kard. C:n.lpallY - :~

-CC(l) HP-UX CC(1)

i ",_ !.'(,F1rnif.r si1hprccess cccm :;upports tlK f"l]pv;;ng oplon:3 whkb r;;:1:': be P&~si:(l to it

in'A': !:c usin,~ 1 bf1 -\\l c option. SOIne uf these e~r~ b~ pa.'Sscd d~rertJy to t hp (~~1\rf'r p:.j-(;g t l~e i- Ilota~i(}l;'_

+t cr -\V C,· b

C'-.in~(.1q the ~:,1('680jO (,0!:~pilpr tc h~'~:~-:;-atc cGdr fot flc~;i.tli~g l_)',JfUt !1f,'f:~ .tLiJ;:'~!.~ fL:::.t

~.(.-:I! t::3C the: aSe35 f!L;a.tillg pUiIl~ ~:u.rd if 1l. i~ ~n,~t~d~p(i !!.!. I.h~~ c~_'n~pt~t(-r 3.1, run-tiree (if l" ..• t iI~staIl<:,d_ uperations VIlli lx· dOLe :n "oftwarr). TLs C.ptiCll ,'aHTwt he nsed

\\;~!t'n {'n~~ l-~ h:;?lng gf!lf'f';:tf"d ~~-."~;-~:~:-':~_;.y t!,;i ~h!::: ~~·~t~08e2(\ ,';ltJ~(;i i ~!cfa.i.l1l \111 d.

:'ylC'G6u,2(j i).:i~it:li 0.y .. ..;l,clIl Uf VIa Lf]'{; r<X,Oi'tlOll.

,for We,--f

\ (UL3f':::· ~ '~1{~- f\llC;G~Olr CtH~lViler to ~TL·~r2,te code fur t1oatill~ point. ~.~] 'ern,! l(;HS thdt

:13[' tJl{; S8(l];) f:O{-}J.llLg pC'iIa I 'r!ii~ ~·,-h~t..' dnes i.t.Ut. r ,-L~~: (~H:C:_~S t Li.: float-poiEt card is in~,,:ta!lcd" l'lii_-; c·~)t.i(/l·. ('aL!:!ot 1)( u.~cci 'vVIlf"l\ ,~("d(· ; ... ~ ;;f'lng gpJ'!.-i,:cli·d eXl'l;('Hiv for ;Ll' .\1Cf.':i02C. f'i:~:cr j,falli'l)r. \,CijgO!l. hJ.+'~ ,ysteLe

! ht' +.x PP!!'):l.

t :\'1- \\' c, -l'ii

rh( \;[C~bKt!2!.j cnrnpitf'r :'>:tfl' ~.:j ;~~~lH~;~~~ .. ! p

"t)pn)('t'S~i:r. Library rOl1t.inf~s \vi11 ht? refcrell('ed f(Jf rruzlherr :'<:~ ~)abiljty. Till,:)

" ) " ' , , f l": ~~:e2,l1l!~lc~ic.-:.s ::·L \~>(-(,::)jlt:; b~1 .. ~i~d ~~yd~t'l~!::"' III ~il (l)i'lIlHCljqL 'NnL t-)(

':'L~~-:, '.'i ... Li~jll adJUbL~ Ltc ~..;ilt (~~ :n~t'1{:~:l cUln~:~1tT 1 Hh!(!s_ ~rh(l {'C[{~:~lk'( l~~f"S iixe(:

.-)1~:{~ "t~Ta·v:; 1'o{' c~ftaln intt~rn~~l L1.h'f'~··. ~;~~t·()".;.d(~'r·u t-:Z {':~f ·'if ~Lf' lttf_~r~' frc'~~

{a.bdepstw}. anrl 11 is ilL intrgf'f ':;:d',,:,: 'lr;c('T/(tGr1] and n ;in: r:ot q)tin'laL 'Tho

~.:·d--jl~ ..,ize~ ~'(Ul be re~-·...;pt·clf:~d 11~I11t: e.ne of the :;CC1.)~L!ary letter::, ~ll~d tLf j~tul~L€r II.

.- fol:,y,vs'

b Tlli:LXill:UlIl si:1.f: of tl,t, be tabIt, Tili" table saves break and

eon-; ill,eon-;,: ldi)"L, ,nth;n i""l';' dud 2\V!'t~, "LaU-nrn.IS. ,)/-,faul1 is U:i~

,;,hle <'ll1neso J.

lkfault is

woe

table rntr!f:-'.

e Pl;)xir::lltrl :";:nher ,): I,ad,,';, piT-tal l'n,f')lL. -;)pfa,dt 1::' :5'>0 tHole

PI~trH'\:,

'Jl:'~ .l.;'Jll c.nl~tl·~~ ',(jlJfff t'tl:df' Ililt'"' llrlLted 0[; 1 L{: d.~;d't~'Inbly t~s) f~le kiR a .... ~sel1!-t1):Ul1lt:!.tl-3, tt113 :-:howing th(} co:"respundel:ce bptv~'(.I(:r~ (~ 301...~r{'c- ar~cl the rf'~u~t.illg ,.t ... i.~!!!,~.,."1 !.'nde

Yt'r~ion Bl, O~tot)('r H)86

CC(l) HP-UX CC(l)

- Y Enable support of 16-bit characters inside string literals and comments. Note that 8-bit parsing is always supported. See hpnls(5) for more details on International Support.

Series 500:

The following options are not supported: -p, -w.

The default is not to allow null pointer dereferencing, hence using -z has no effect.

The file /lib/mcrtO.o is not currently supported.

The compiler subprocess ccom supports the following options, which may be passed to it from cc using the -W c option. Some of these can be passed directly to the driver using the

" +" notation.

+N<secondary><n> or -W c,-N<secondary><n>

This option adjusts the size of internal compiler tables. The compiler uses fixed size arrays for certain internal tables. Secondary is one of the letters from the set {bpwgi}, and n is an integer value. Secondary and n are not optional. The table sizes can be re-specified using one of the secondary letters and the number n as fol-lows:

b maximum size of the be table. This table saves break and continue labels within loops and switch statements. Default is 100 table entries.

p maximum size of the parameter stack. Default is 150 table entries.

g maximum size of the argument stack. Default is 100 table entries.

w maximum size of the switch table. Default is 250 table entries.

maximum size of the instruction table for generated code. Default is 300 table entries.

The following option is supported:

- Y Enable support of 16-bit characters inside string literals and comments. Note that 8-bit parsing is always supported. See hpnls(5) for more details on International Sup-port.

Series 800:

The default is to allow null pointer dereferencing, hence using -Z has no effect.

The -g option is incompatible with optimization.

The compiler subprocess ccom supports the following options, which may be passed to it from cc using the -W option. Note: The" +optl +opt2" notation may be used instead of the "-Wc,-optl,-opt2" notation.

+a or -W c,-a

When processing files which have been written in assembly language, do not assemble with the prefix file which sets up the space and subspace structure required by the linker. Files assembled with this option may not be linked unless they contain the equivalent information.

+Oopt or -W c,-Oopt

Invoke optimizations selected by opt. If opt is ' 1', then only level 1 optimi-zatIOns are handled. If opt is '2', then all optimizations are performed.

The option +02 is the same as -0.

EXAMPLE

The following will compile the C program prog.c, creating a prog.o file, and will then invoke the

Hewlett-Packard Company - 5 - Version B.1, October 1986

CC(l)

FILES

HP-UX CC(l)

link editor Id(l) to link prog.o and procedure.o with all the C startup routines in /lib/crtO.o and library routines from the C library libc.a; the resulting executable program is output in prog:

cc prog.c procedure.o -0 prog

optional optimizer (for Series 200, Series 300 and Series 500 only) assembler, as(l)

link editor, Id(l) runtime startoff startoff for profiling

standard C library, see section 3 of this manual standard directory for #include files

compiler, MC680IO version (linked to /lib/ccom on MC680IO sys-tems).

compiler, MC68020 version (linked to lib/ccom on MC68020 sys-tems).

optimizer, MC680IO version (linked to lib/c2 on MC680IO systems).

optimizer, MC68020 version (linked to lib/c2 on MC68020 systems).

assembler, MC680IO version (linked to /bin/as on MC680IO

The diagnostics produced by C itself are intended to be self-explanatory. Occasional messages may be produced by the assembler or the link editor.

WARNINGS

Options not recognized by cc are not passed on to the link editor. The option - W l,arg may be used to pass any such option to the link editor.

By default, the return value from a C program is completely random. The only two guaranteed ways to return a specific value are to explicitly call exit(2) or to leave the function mainO with a 'return expression;' construct.

SEE ALSO

adb(l), cdb(l), cpp(l), as(l), Id(l), prof(l), exit(2), monitor(3C), matherr(3M).

B. W. Kernighan and D. M. Ritchie, The C Programming Language, Prentice-Hall, 1978.

INTERNATIONAL SUPPORT

8- and 16-bit data only in strings and comments, 8-bit filenames.

Series 800 does not support 16-bit data.

Hewlett-Packard Company - 6 - Version B.1, October 1986

CD(l) HP-UX CD(!)

NAME

cd -- change working directory SYNOPSIS

cd

!

directory DESCR[PTION

If directory is not specified, the valu!' of sheil para.m.eter $HOl\fE is used as the new working directory. If direct()ry specifies a completf' path &tB.ltl.lg wit\ / ... ", r:hnci,)ry h,"comes the nc'''\'' working directory. If neither case applies, cd tries t,} Hni th", de"ignatt'il directory relative t:J ',):lP

of the paths specified by the $CDP A TH shell -,rariB.ble $CDP ATH h::lef the same syntax a.,<;, and similar sem~mtic~ to, the $P ATH shell variabl? CJ must ~lavc execute ('3parr h; permlssioC1 b directory.

Because a ~£w process is created tc eX(,C~ltc c::c~, CO::::::!>l;,j. d w{nH ~w ;net~"'('tiV(' if it VJ{'fP writ.

ten as a normal command; therefore, it is rec'J;;nized and ii, internal to th(> shelL VARIABLES

HOME

CD PATH

default working directory dirt'ctories to search for direrbry.

SEE ALSO

pwd(l), sh(l), chdir('2).

INTERNATIONAL SUPPORT 8-bit filenamef'. mesBag(,g

Ht',,,ktt-?ackard Company 1 - Vrroi,li) 13.1. Octnlwr 198fi

CDB(i) HP-UX CDB(I) Pascai pre·grams. It provides a c(;Ltrolled environment for their execution.

Oljectjile is an execut}!,ble prrgram file having one or more of its component modules compiled

USf'd witJ~ Record and Playback Commands.

flP,IJlt'S a J+cl;bc.ck fiIf: which is ir.voked immediately. Used with Record and Play-back Commands.

Hewlett.-Packard Company - 1 - Version B.l, October 1986

CDB(l) HP-UX CDB(l) Series 200, 300, 500 Only

-8 num sets the size of the string cache to num bytes (default is 1024). The string cache holds data read from objectfile.

Only one objectfile and one corefile are allowed per debugging session. The program (objectfile) is not invoked as a child process until an appropriate Job Control Command command is given.

The same program can be restarted many times (as different child processes) during a single debugging session.

CONVENTIONS

The debugger remembers the current file, current procedure, current line, and current data loca-tion. They are a function of what you have been viewing (not necessarily executing) most recently. Many commands use these current locations as defaults, and many commands set them as a side effect. It is important to keep this in mind when deciding what a command does in any particular situation.

For example, if you stop in procedure "abc", then view procedure "der, then ask for the value of local variable "xyz", the debugger assumes that the variable belongs to procedure "def".

Notational Conventions

Most commands are of the form "[modifier] command-letter [options]". Numeric modifiers before and after commands can be any numeric expression. They need not be just simple numbers. A blank is required before any numeric option. Multiple commands on one line must be separated by"(.

These are common modifiers and other special notations:

(A I B I C) Anyone of A or B or C is required.

[A I B I C] Anyone of A or B or C is optional.

file A file name.

proc A procedure (or function, or subroutine) name.

var A variable name.

number A specific, constant number (e.g. "9", not "4+5"). Floating point (real) numbers may be used any place a constant is allowed.

expr Any expression, but with limitations stated below.

depth A stack depth, as printed by the "t" command. The top procedure is at a depth of zero. A negative depth acts like a depth of zero. Stack depth usually means

"exactly at the specified depth", not "the first instance at or above the specified depth".

format A style for printing data. Used with Data Viewing Commands.

commands A series of debugger commands, separated by "(, entered on the command line or saved with a breakpoint or assertion. SemicolonI'! are ignored (as commands) so they can be freely used as command separators. Commands may be grouped with

"{}" for the NaN, "bH, "ii, and "!H commands. In all other cases commands inside

" {}" are ignored.

Variable Name Conventions

Variables are referenced exactly as they are named in your source ffie(s). Case sensitivity is con-trolled by the HZ" command. Be careful with one letter variable names, since they can be con-fused with commands. If an expression begins with a variable that might be mistaken for a com-mand, just enclose the expression in

"0"

(e.g. "(kr), or eliminate any white space between the variable and the first operator (use "k= 9" instead of "k = 9").

If you are interested in the value of some variable var, there are a number of ways of getting it, depending on where and what it is:

Hewlett-Packard Company - 2 - Version B.1, October 1986

CDB(l)

var

HP-UX CDB(l)

Series 200, 300, 500 Only

Search the stack for the most recent instance of the current procedure. If found, see if vaT is a parameter or local variable of that procedure. If not, search for a global variable named either var or _var, in that order.

proc. var Search the stack for the most recent instance of proc. If found, see if it has a parameter or local variable named var, as before.

proc. depth. var Use the instance of proc that is at depth depth (exactly), instead of the most recent instance. This is very useful for debugging recursive procedures where there are multiple instances on the stack.

:var Search for a global (not local) variable named either var or _var, in that order.

Special variables are names for things that are not normally directly accessible. Special variables include:

Svar The debugger has room in its own address space for a number of user-created special vari-ables. There are 26 of them by default (this number is adjustable using the -s invocation option). They are all of type long, and do not take on the type of any expression they are assigned. Names are defined when they are first seen. For example, saying "$xyz

=

3*4" creates special symbol "$xyz", and assigns to it the value 12. Special variables may be used just like any other variables.

$pc, S£p, Ssp, SrO, etc.

Sresult

Ssignal

These are the names of the program counter, the frame pointer, the stack pointer, the registers, etc. To find out which names are available on your system, use the "I r" (list registers) command. All registers act as type integer.

This is used to reference the return value from the last command-line procedure call.

Where possible, it takes on the type of the procedure. Sshort and Slong are available as alternate ways of looking at Sresult.

This lets you see and modify the current child process signal number.

Slang This lets you see and modify the current language (0 for C, 1 for FORTRAN, or 2 for while in a non-debuggable procedure before setting an up-level breakpoint and free-running to it. Setting it to a small value can improve debugger performance, at the risk of taking off free-running after missing the up-level break for some reason.

Hewlett-Packard Company - 3 - Version B.l, October 1986

CDB(l) HP-lJX CDBtl}

"In"

(print in normal format).

Integer constants may begin with "0" for octal or "Ox" or "OX" for hexadecimal (the forms are compatibility with FORTRAN. However. all floating pO~Ht constants are taken as doubles. regar'l-less. are Lhen cast to proper Jestiudtion tYpe" for dS<51gIllllellb.

If a floating point number is used with an operator th"t doesn't nomJally permit it, the 'Hu:lbef is

HewleU-Par:kard Company - 4 - Version 13.1. October 1986

CDB(1) HP-UX CDB( 1) Series 200, 300, 500 Only

Usc" / /" for division. instead of

"r,

to distinguish froIll display fonnatting (see Data Vif'wing Commands).

The special unary operator "$in" (not to l~ confused with debugger local variables) evaluates to 1 (true) if th~ operand is an address inside a debuggable procedure and $pc (the current child pro-cess program location) is also iI!. that procedure, else it is 0 (false). For example, "$in main" is trut) if the child process IS stnpped in rnainO

If 1 hf~ fir':'t expH;ssion OIl a !i!l~ begms with'

+.,

or " n , use

"0"

around it to distillguish from the

., +"

and commands (gee Dat,. Vittmnq Commands). Parentheses may also be neeoed to dis-ti!!gu.ish a;: ~;{pr€St;iOTi frc:rr~ .j, (;villllla.llJ it liiudifies.

You can atterrrpt to dereference any ccmstant. variable, or expression result lliling the C " .. " opera-tor. If the address is :I:Yi-i.1id, all {'fror is given,

WhenevH R1, i'JTdY variable is n·ferencf'(l without giving all its subscripts, the result is the address cf the lcViest derr-;cnt rderniCe(l. Fur example, consider an array declared as "x[5][6][7]" in C,

";.::('),f,7}" FORTH.A>;, \!l"-;;i ,;:',2..6,3 .. 7]" b Pascal. Referencing It simply as "x" is the same as Just "x" in C. tLt- "dore,,;;; .)f "xi i,l))" in FORTRAN, or the address of "x[1,2.~W in Pascal Heferencing it as "x[4j" is the same a..s "& (x[4][O][OJ)" in C, the address of "x(lJ,4)" in FOR-TRAN, or the addr!'Ss cJ'):4,2,3j" in Pa.scaL

If a Eot-fullyqualified arn;y f('fcre:lce appEars t)!l the left side of an assignment, the value of the right·haEd exprefoSIOIl J;' ::'h'fI~d i~lto the dement 2,t the address specified,

3trL.:.g CUIlSi;ill1I:S are stofui m a magic butfer ill the file /U8T /lib/end.o, which you link with your

3trL.:.g CUIlSi;ill1I:S are stofui m a magic butfer ill the file /U8T /lib/end.o, which you link with your

Dans le document HP-UX Reference (Page 107-134)