This is the mail archive of the
mailing list for the GDB project.
Re: dead code in frv-tdep.c?
- From: Kevin Buettner <kevinb at redhat dot com>
- To: gdb-patches at sourceware dot org
- Cc: Joel Brobecker <brobecker at adacore dot com>
- Date: Mon, 23 Nov 2009 13:51:33 -0700
- Subject: Re: dead code in frv-tdep.c?
- References: <20091002230846.GT6532@adacore.com>
On Fri, 2 Oct 2009 16:08:46 -0700
Joel Brobecker <firstname.lastname@example.org> wrote:
> Not sure who I should ask this. It looks like you were the last
> person to make some real changes to that file, so I'm asking you first.
> I noticed what looks like dead code in frv-tdep.c:
> frv-tdep.c:frv_stopped_data_address (CORE_ADDR *addr_p)
> frv-tdep.c:frv_have_stopped_data_address (void)
> The former is only called by the latter, and the latter is never called.
> frv_stopped_data_address almost looks like a function that would be
> used as one of the target_ops methods, but this would more typically
> be found in a -nat file...
> Do you know what we should do with this code?
According to our internal repository, these now dead functions were
added early in 2002 to implement hardware watchpoint support. At the
time, there was a config/frv/tm-frv.h file and presumably one or more
of the watchpoint related macros called these functions.
For the moment, I'd like to leave these as dead code. I'll try to
find some time to figure out how to make them non-dead, or failing that,
I'll delete them.
Thanks for bringing this to my attention.