Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!samsung!think.com!mintaka!spdcc!iecc!compilers-sender From: michi@ptcburp.ptcbu.oz.au (Michael Henning) Newsgroups: comp.compilers Subject: Re: yacc & dbx Keywords: yacc, debug Message-ID: <299@ptcburp.ptcbu.oz.au> Date: 31 Jan 91 02:45:11 GMT References: <9101291603.aa15778@castle.ed.ac.uk> Sender: compilers-sender@iecc.cambridge.ma.us Reply-To: michi@ptcburp.ptcbu.oz.au (Michael Henning) Organization: Pyramid Technology Corporation Lines: 23 Approved: compilers@iecc.cambridge.ma.us htf@castle.edinburgh.ac.uk (H T Fallside) writes: >Anyone have any suggestions about ways of getting dbx to behave sensibly >with a yacc generated parser as part of the program - ie indexing into the >source during debug ? There is not necessarily any sensible way to deal with #line directives in the generated .c file. The easiest thing is usually to pre-process the generated code with sed or some other tool to remove the #line directives before compilation. Michi. -- Michael Henning +61 75 950255 Pyramid Technology +61 75 522475 FAX Research Park, Bond University michi@ptcburp.ptcbu.oz.au Gold Coast, Q 4229, AUSTRALIA uunet!munnari!ptcburp.oz!michi [My experience is quite different; I've found it quite useful to put in breakpoints and single step by line in the .y file. If you don't like the #line directives, the -l flag to yacc prevents them. -John] -- Send compilers articles to compilers@iecc.cambridge.ma.us or {ima | spdcc | world}!iecc!compilers. Meta-mail to compilers-request.