From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29910 invoked by alias); 8 Feb 2002 11:35:37 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 29839 invoked from network); 8 Feb 2002 11:35:33 -0000 Received: from unknown (HELO fw-cam.cambridge.arm.com) (193.131.176.3) by sources.redhat.com with SMTP; 8 Feb 2002 11:35:33 -0000 Received: by fw-cam.cambridge.arm.com; id LAA20612; Fri, 8 Feb 2002 11:35:32 GMT Received: from unknown(172.16.1.2) by fw-cam.cambridge.arm.com via smap (V5.5) id xma020040; Fri, 8 Feb 02 11:34:51 GMT Received: from cam-mail2.cambridge.arm.com (localhost [127.0.0.1]) by cam-admin0.cambridge.arm.com (8.9.3/8.9.3) with ESMTP id LAA02641 for ; Fri, 8 Feb 2002 11:34:50 GMT Received: from sun18.cambridge.arm.com (sun18.cambridge.arm.com [172.16.2.18]) by cam-mail2.cambridge.arm.com (8.9.3/8.9.3) with ESMTP id LAA07778; Fri, 8 Feb 2002 11:34:49 GMT Message-Id: <200202081134.LAA07778@cam-mail2.cambridge.arm.com> X-Mailer: exmh version 2.0.2 2/24/98 To: gdb@sources.redhat.com cc: Richard.Earnshaw@arm.com Reply-To: Richard.Earnshaw@arm.com Organization: ARM Ltd. X-Telephone: +44 1223 400569 (direct+voicemail), +44 1223 400400 (switchbd) X-Fax: +44 1223 400410 X-Address: ARM Ltd., 110 Fulbourn Road, Cherry Hinton, Cambridge CB1 9NJ. X-Url: http://www.arm.com/ Subject: multi-arch and CALL_DUMMY_BREAKPOINT_OFFSET Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 08 Feb 2002 03:35:00 -0000 From: Richard Earnshaw X-SW-Source: 2002-02/txt/msg00130.txt.bz2 I guess I'm going to find several things like this... Well it appears that in a multi-arch gdb (even at level 1), CALL_DUMMY_BREAKPOINT_OFFSET can only be a constant for any particular architecture. This is a problem, because on the ARM it is currently a function that returns one of two values depending on whether the call-dummy stub has to be ARM code or Thumb code. Note that both types of code can exist within a single application and it is not always safe to assume that every function is interworking safe. I guess I could re-write the whole of the call-dummy stuff so that appropriate breakpoints are built in, but that is certainly going to be non-trivial. Any suggestions? Can I diddle with the gdbarch setting dynamically -- eg by calling gdbarch_set_call_dummy_breakpoint_offset() from within arm_fix_call_dummy()? It's quite gross, but it might work. Long term it would probably be better to rewrite the call-dummy handling to remove the covert variable that is used to communicate between the various call-dummy stubs, but I'd rather not do that now. R.