From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31842 invoked by alias); 6 Dec 2005 23:05:03 -0000 Received: (qmail 31835 invoked by uid 22791); 6 Dec 2005 23:05:02 -0000 X-Spam-Check-By: sourceware.org Received: from zproxy.gmail.com (HELO zproxy.gmail.com) (64.233.162.205) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 06 Dec 2005 23:05:02 +0000 Received: by zproxy.gmail.com with SMTP id x3so195735nzd for ; Tue, 06 Dec 2005 15:05:00 -0800 (PST) Received: by 10.36.5.19 with SMTP id 19mr919586nze; Tue, 06 Dec 2005 15:04:59 -0800 (PST) Received: by 10.37.2.6 with HTTP; Tue, 6 Dec 2005 15:04:59 -0800 (PST) Message-ID: <8f2776cb0512061504la4a7a5brada0edaeb051f0e4@mail.gmail.com> Date: Wed, 07 Dec 2005 17:44:00 -0000 From: Jim Blandy To: Andrew STUBBS Subject: Re: [PATCH] Allow spaces in filenames to load command Cc: GDB Patches In-Reply-To: <43956C93.5070709@st.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <43949300.1040203@st.com> <8f2776cb0512051250u2a6083dbma95e6b352410dea8@mail.gmail.com> <43956C93.5070709@st.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2005-12/txt/msg00126.txt.bz2 Okay, we have a bigger problem here than I'd thought. generic_load is a generic implementation of the target to_load method, for use by targets that just want to use target_write_memory_partial to write the loadable sections of the exec file to the target's memory. It's used by the GDB remote protocol and some of the other remote targets. However: - dve3900-rom.c, remote-m32r-sdi.c, remote-mips.c, and wince.c just expect a filename. - monitor.c uses sscanf ("%s 0x%lx") to parse its argument. - remote-e7000.c parses -quiet and -nostart arguments, but no load offset. - remote-sim.c passes it on to sim_load, which always seems to expect a filename. So testing for address equality is a way for generic_load to recognize when it's being given a lone filename that shouldn't be broken up, without changing load_command in a way that would break the seven non-generic-load targets out there. I feel morally compromised. :) Let me think about this a bit.