From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13761 invoked by alias); 25 Feb 2009 06:07:51 -0000 Received: (qmail 13749 invoked by uid 22791); 25 Feb 2009 06:07:50 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.33.17) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 25 Feb 2009 06:07:44 +0000 Received: from wpaz13.hot.corp.google.com (wpaz13.hot.corp.google.com [172.24.198.77]) by smtp-out.google.com with ESMTP id n1P67eOZ025765 for ; Wed, 25 Feb 2009 06:07:41 GMT Received: from wf-out-1314.google.com (wfc25.prod.google.com [10.142.3.25]) by wpaz13.hot.corp.google.com with ESMTP id n1P67cBp023638 for ; Tue, 24 Feb 2009 22:07:39 -0800 Received: by wf-out-1314.google.com with SMTP id 25so3008828wfc.6 for ; Tue, 24 Feb 2009 22:07:38 -0800 (PST) MIME-Version: 1.0 Received: by 10.142.102.5 with SMTP id z5mr2960224wfb.146.1235542058293; Tue, 24 Feb 2009 22:07:38 -0800 (PST) In-Reply-To: References: <20090224023251.GA22085@caradoc.them.org> <20090224170850.GA14727@caradoc.them.org> Date: Wed, 25 Feb 2009 06:07:00 -0000 Message-ID: <8ac60eac0902242207i491f699dud53c36a20bd61095@mail.gmail.com> Subject: Re: problem remote debugging From: Paul Pluzhnikov To: Brendan Miller Cc: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2009-02/txt/msg00156.txt.bz2 On Tue, Feb 24, 2009 at 11:51 AM, Brendan Miller wrote: > Intuitively that seemed wrong to me because if a breakpoint is in the > wrong place, or outside the text segment, then I'd just expect it to > break in a different place, or not at all. What if a "breakpoint" is set in read-only data or .bss of the program? Imagine that an arbitrary data byte in your program is replaced with 0xCC. Will your program surivive any such replacement? For example: size_t foo() { static char *p = NULL; if (!p) { p = strdup("Hello"); } return strlen(p); } What will this routine return if "p" is overwritten by 0x000000CC by GDB before the execution starts? Cheers, -- Paul Pluzhnikov