Bug 4800 - CDTParser does not recognize when it enters/leaves "main" for bash
Summary: CDTParser does not recognize when it enters/leaves "main" for bash
Alias: None
Product: frysk
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Rick Moseley
Depends on:
Blocks: 1633
  Show dependency treegraph
Reported: 2007-07-17 13:54 UTC by Rick Moseley
Modified: 2007-08-01 19:55 UTC (History)
0 users

See Also:
Last reconfirmed:


Note You need to log in before you can comment on or make changes to this bug.
Description Rick Moseley 2007-07-17 13:54:48 UTC
When debuginfo is loaded for bash and the CDTParser parses the "shell.c" source
code, it does not recognize when the "main" function is entered due to the
unique way "shell.c" defines "main" with "ifdef's" located around it.  This
causes a "main" function not to be found in the DOM which when the line number
currently being executed in the DOM is located in "main", the disassembly view
is presented instead of the source code.
Comment 1 Rick Moseley 2007-08-01 19:55:16 UTC
bash has a very unique "main" declaration in "shell.c", it has a bunch of
ifdef's around several declarations of "main" depending on how many parameters
are entered when starting a bash shell.  The parser will never handle this
without extensive work.  We have put in patches for now to ignore this problem
and just not mark up "main".