This is the mail archive of the mailing list for the binutils 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] include/gdb/section-scripts.h: New file.

Tom> I don't see why this needs to go in include.

Doug> So you would have code that puts contents in this section using
Doug> magic numbers?  Eh? This doesn't make any sense.

I didn't say that.

Doug> Why does dwarf2.def exist (for example) ?

Because it has multiple in-tree users that ought to be kept in sync,
including some in gcc.

Doug> [The dwarf format is far more complicated, obvously.  But I didn't
Doug> know there was
Doug> a threshold of magic numbers was required before a header was allowed.]

I don't think there is, and I didn't say that either.

Doug> +/* Native GDB scripts are not currently supported in
Doug> .debug_gdb_scripts,
Doug> +   but we reserve a value for it.  */
Doug> +/*#define SECTION_SCRIPT_ID_GDB_FILE 2*/

Tom> There's no need either to reserve a value or to add commented out code.

Doug> I'm curious how I would apply this rule in general.

1. Don't check in commented-out code.

2. If a format is versioned or otherwise extensible, there is never a
   need to reserve space for a future change.  Instead just use the
   versioning or extension mechanism when the relevant change is made.
   In this case the appropriate time would be when actually changing gdb
   to read gdb scripts from the section.


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