This is the mail archive of the
mailing list for the GDB project.
Re: [10/19] record_line
- From: Eli Zaretskii <eliz at gnu dot org>
- To: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 05 Jun 2009 21:14:59 -0400
- Subject: Re: [10/19] record_line
- References: <200906052118.n55LIGmw029014@d12av02.megacenter.de.ibm.com>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> Date: Fri, 5 Jun 2009 23:18:16 +0200 (CEST)
> From: "Ulrich Weigand" <email@example.com>
> the record_line routine calls gdbarch_addr_bits_remove on the PC it is
> passed. As there is no appropriate objfile at hand in this routine,
> the following patch moves this operation up into the callers of record_line,
> which will use the objfile architecture of the file they are processing.
Maybe I'm missing something, but isn't this rather inelegant? We are
moving some detail that is private to record_line into its callers,
just because record_line doesn't know the architecture nor the objfile
to get the architecture from? Why not simply pass the architecture or
the objfile to record_line instead?