This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Outwit compiler dead code elimination in break.exp test (revised patch)


The interesting part: before and after tests.

native i686-pc-linux-gnu, gcc 2.95.3 and 3.3.2, dwarf-2 and stabs+.

To save time, I tested only gdb.base.

All tests came out the same, except for the new names, such as:

  OLD: gdb.base/break.exp: hit silent break 79
  NEW: gdb.base/break.exp: hit silent break bp_location1

This is okay.  In fact, I like the new names better than the old names.

---

These files need updates to copyright years:

  condbreak.exp
  define.exp
  ena-dis-br.exp
  info-proc.exp
  maint.exp

---

break.c and break1.c need copyright notices.
Andrew C can provide a list of years for break.c,
  covering the time before it was moved to sourceware.

---

This wording is confusing:

  "Some of the tests that use this file compile it with optimization on,
   which can result in these functions being optimized away.  So it is
   compiled into a a [sic] separate object file."

This confuses me.  The first line suggests that the sentence is still
optimizing away the functions!  How about something like:

  "These functions are in a separate source file to prevent an optimizing
   compiler from inlining them and optimizing them away."

---

Michael C

---

2003-12-07  Fred Fish  <fnf@redhat.com>

	* gdb.base/break.c (marker1, marker2, marker3, marker4): Move
	functions to break1.c and leave prototypes behind.  Add more
	"set breakpoint NN here" comments.
	* gdb.base/break1.c: New file.

	* gdb.base/break.exp: Handle compiling test case from multiple
	source files and change source file references as needed.
	* gdb.base/completion.exp: Ditto.
	* gdb.base/condbreak.exp: Ditto.
	* gdb.base/define.exp: Ditto.
	* gdb.base/ena-dis-br.exp: Ditto.
	* gdb.base/info-proc.exp: Ditto.
	* gdb.base/maint.exp: Ditto.
	* gdb.base/until.exp: Ditto.

	* gdb.base/condbreak.exp: Use bp_locationNN variables instead of
	hardcoded line numbers.
	* gdb.base/define.exp: Ditto.
	* gdb.base/ena-dis-br.exp: Ditto.
	* gdb.base/maint.exp: Ditto.
	* gdb.base/until.exp: Ditto.

	* gdb.base/completion.exp: Use "break1" for completion tests since
	"break" is no longer a unique prefix.


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