From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27457 invoked by alias); 15 May 2013 16:26:12 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 27443 invoked by uid 89); 15 May 2013 16:26:12 -0000 X-Spam-SWARE-Status: No, score=-4.7 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL autolearn=ham version=3.3.1 Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 15 May 2013 16:26:11 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1UceWn-0002dq-VL from Luis_Gustavo@mentor.com ; Wed, 15 May 2013 09:26:10 -0700 Received: from NA1-MAIL.mgc.mentorg.com ([147.34.98.181]) by svr-orw-fem-01.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Wed, 15 May 2013 09:26:09 -0700 Received: from [172.30.8.147] ([172.30.8.147]) by NA1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 15 May 2013 09:26:08 -0700 Message-ID: <5193B71E.30402@codesourcery.com> Date: Wed, 15 May 2013 16:26:00 -0000 From: Luis Machado Reply-To: lgustavo@codesourcery.com User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 MIME-Version: 1.0 To: Mike Frysinger CC: "'gdb-patches@sourceware.org'" Subject: Re: [RFC, gdbserver] Avoid defining linux_read_offsets when the target does not need it References: <519370AE.50908@codesourcery.com> <201305151206.57607.vapier@gentoo.org> In-Reply-To: <201305151206.57607.vapier@gentoo.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2013-05/txt/msg00545.txt.bz2 On 05/15/2013 06:06 PM, Mike Frysinger wrote: > On Wednesday 15 May 2013 07:25:34 Luis Machado wrote: >> uClibc-based targets can load their programs in an offset in memory, and >> this information has historically been communicated to gdbserver via >> ptrace with the following options: PT_TEXT_ADDR, PT_DATA_ADDR and >> PT_TEXT_END_ADDR. > > well, not to be pedantic, but this is for FLAT programs, not uClibc Ok. uClibc has been used here due to its gdbserver-specific #if guard explicitly checking for UCLIBC and mmu-lessness. >> We have a target that uses loadmaps as opposed to the above mechanism. >> It is just another ptrace request, but it doesn't use linux_read_offsets >> at all. > > you mean FDPIC ? gdb already supports that and uses a different set of ptrace > requests for that. ideally, gdb nor gdbserver should not be tied to a specific > file format (what format it happened to be compiled for). instead, gdbserver > should support all formats and then gdb detects the format and changes its > requests based on that. Not FDPIC, but DSBT. I agree gdb/gdbserver should be format-agnostic, but it grew like this. Let's not extend the uglyness though. I have a change coming that will deal with some of the differences when handling FDPIC and DSBT, hopefully making things more generic. Luis