This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Patch to preserve programmer specified labels in flow.c

Hi Jeff,

:   > OK, here is a re-worked version.  I have had to add an extra part to
:   > the patch to allow the DWARF2 code to emit the addresses of deleted
:   > labels, and my one worry is that I could not find the equivalent piece
:   > of code in dbxout.c....
: I'm still not sure why dwarf2 needs to know about these labels.  If they
: were deleted, it was because nothing referenced them -- thus putting a
: breakpoint on such a label is meaningless.

Because the label was created by the programmer, so they expect to be
able to put a breakpoint on it.  For example, in the source fragment I
mentioned before: 

      switch (c)
	case '%':
          lptr = fmt - nbytes;

GCC eliminates the label 'literal' because it is also represented by
the case '%' in the switch table.  An earlier "goto literal" is
replaced with "goto case '%'" (effectively!), but if we eliminate the
information about label 'literal' from the debug output then it will
be impossible for the user to put a break on the destination of the
goto instruction.

: It's acceptable, iff we actually decide this is a problem we need to
: solve.

Is this a sufficient justification ?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]