Re: [PATCH v10 04/10] Create empty common/linux-maps.[ch] and common/target-utils.[ch]

Jan Kratochvil
2015-07-16T08:32:22Z

On Thu, 16 Jul 2015 10:14:12 +0200, Gary Benson wrote:
> I don't fully understand the tdep/non-tdep split very well.

I understand that *-tdep.c is all of the support that makes sense for all the
arch support that can be done cross-arch for loading/examining files plus all
the arch support usable with remote gdbserver (cross-arch in general, with
gdbserver it can be also native-arch but that does not matter).

linux-maps.[ch] provides linux_find_memory_regions_full() which is used in
linux-tdep.c and in gdbserver but for mostly unrelated purposes, so it is
rather just a code reuse and it is not architecturally the same functionality
called from both linux-nat+gdbserver just because linux-nat hasn't been
dropped yet.

linux-maps.[ch] also exports its read_mapping() to linux-tdep.c which is again
only arbitrary code reuse from two unrelated places of code.

Jan