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: [rfc/testsuite/mi] use gdb_get_line_number


Here is a draft patch for gdb.mi/mi-break.exp to use
gdb_get_line_number.

It works, but that's beside the point.  I'm looking for the right style.
So this is RFC, not RFA.

Some questions:

. there are a lot of line_* variables.  how would you like me to name
  them and manage them?

. some of the test names have line numbers embedded in them:

"insert temp breakpoint at basics.c:15 (callee3)"

this is now

"insert temp breakpoint at basics.c:$line_callee3 (callee3)"

  so the name floats around as basics.c changes.  That is, I just
  did the simple stupid substitution.  What would you really like for
  test names like this?

Yea, not really. basics.c:callee3 && basics.callee3.prolog?



+ # Locate line numbers in basics.c.
+ set line_callee4        [expr [gdb_get_line_number "callee4 ("]]
+ set line_callee4_plus_2 [expr [gdb_get_line_number "callee4 ("] + 2]

I'm wondering if the latter should be called:


line_callee4_past_prologue

(that specific name is bad but I think the intent is clear) so it's clear that it is past the callee4's prologu.

Andrew



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