This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] [SH] Prologue skipping if there is none
- From: Pedro Alves <palves at redhat dot com>
- To: Thomas Schwinge <thomas at codesourcery dot com>
- Cc: Kevin Buettner <kevinb at redhat dot com>, gdb-patches at sourceware dot org
- Date: Fri, 02 Mar 2012 12:00:36 +0000
- Subject: Re: [PATCH] [SH] Prologue skipping if there is none
- References: <87pqdgciho.fsf@schwinge.name> <20120215075413.1313f7fa@mesquite.lan> <20120215165907.33f2e9a6@mesquite.lan> <8739aad9il.fsf@schwinge.name> <20120216182544.36b41a1b@mesquite.lan> <87mx8da3b9.fsf@schwinge.name> <20120220162029.2082b6a1@mesquite.lan> <87wr7c7aop.fsf@schwinge.name> <20120224144657.36bbd09f@mesquite.lan> <87r4xd528y.fsf@schwinge.name> <87d38w4rxr.fsf@schwinge.name> <20120301171847.306829ba@mesquite.lan> <87mx7z2qwc.fsf@schwinge.name>
On 03/02/2012 11:17 AM, Thomas Schwinge wrote:
> On Thu, 1 Mar 2012 17:18:47 -0700, Kevin Buettner <kevinb@redhat.com> wrote:
>> > On Thu, 01 Mar 2012 10:00:00 +0100
>> > Thomas Schwinge <thomas@codesourcery.com> wrote:
>> >
>>> > > @@ -594,6 +590,7 @@ sh_analyze_prologue (struct gdbarch *gdb
>>> > > {
>>> > > sav_reg = reg;
>>> > > offset = (inst & 0xff) << 1;
>>> > > + /* TODO: check that this is a valid address. */
>>> > > sav_offset =
>>> > > read_memory_integer ((pc + 4) + offset, 2, byte_order);
>>> > > }
>> >
>> > FIXME and TODO comments are generally frowned upon. All too often,
>> > they end up hanging about for many years.
>> > You may want to just keep that TODO comment in your tree or in
>> > some other TODO list on the side.
> Hmm, I don't agree. I think it's better to have such comments in a
> central place, instead of each developer having their own set of them in
> their own files. I do agree that source code comments are not useful for
> more *general* ``work to be done'', but this is a very local issue, where
> the comment applies directly to the next line. Anyway, I'm not the one
> to set the rules here; I've taken these out.
FWIW, I agree that FIXMEs and TODOs in the code can be helpful. I've learnt
immensely about gdb's intended direction from the FIXME's in place. However,
there should be a high barrier to adding new FIXMEs. If the fix is
known, and it doesn't involve e.g., deep design level changes, then we should
just get it fixed before the change lands in the tree. In this case, what's
necessary to just fix that particular issue?
--
Pedro Alves