From owner-freebsd-hackers@freebsd.org Sat Jan 2 22:53:12 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 15FC7A5F084 for ; Sat, 2 Jan 2016 22:53:12 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: from mail-wm0-x236.google.com (mail-wm0-x236.google.com [IPv6:2a00:1450:400c:c09::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A606B10B9 for ; Sat, 2 Jan 2016 22:53:11 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: by mail-wm0-x236.google.com with SMTP id f206so105794628wmf.0 for ; Sat, 02 Jan 2016 14:53:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=KXPvKojzmwF8+kUnlyBm7DEQKONrzke1ReJHoKk2FFA=; b=Npo5Navdk+ioBaZ526gIMN/9XmOZYhLBwk/cN+cCXWkPlV0TdMbJe6MidN4SXa6O6s ajc/Q+3mPvoud+xEwl/scFGKF27um7X0zqsr0oJp+iRG46ReVkN8ZKE1BirNXItLf+y/ qAjcT7QRqfsKKwR94mR5uW7CRHevsf4FBP3iueZ0GDpmRh+iwinnNIzyXwpXW0iHa/Nh 4A5Bqu2JZ5uaadyGukwRSSqNOvJlnd/s3ks7oY/M98RXvtOiOmygQw5WLeVLDA29W6MV h1XmHDcBydbH4qiM/IAvxUQEj2/nzUX6TSmQnM496+Na5TOYbnXnhdftcSPu/c/mI3ul QrdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=KXPvKojzmwF8+kUnlyBm7DEQKONrzke1ReJHoKk2FFA=; b=ej1tlLkell5qT4pWeoWFHH4g6UPQhUbgismGyQdWPyFcMDGCQtH6CO3DCVR9BKcmXh eh8npWDM/yjMXWszKG/DfWnIXrku40l7uJhXEBm4YyURxsNjBAAv8Y0XJ8Onrp4523+h wtLgPm8h2HNfZF5+QWFBeY0awJ0HYMoNysaiHch/9QJXZvE/fTcZrQliWDun4tNfZAAC b0GX78nm1Wxy0yXJ96a6Y1GFxf6q2COmicMW0jS0XJnexC4k/hnujXhge9RSn16xIZg5 9V6R2eR2Imf2LC8jhEuj5LjVdyXCvSFa9VVW4IKRVpFHMQv3QhqIJiP3foVvuDGBvneQ 6rBw== X-Gm-Message-State: ALoCoQmFRnAVnudgIKxWoQCB8ni/E6Dpu+/kANdU9Ij13sMUTI/3xN05FyVDqRSascATqzxOKSnJGqbT0rP2HdY+tUlQI2w5GCEOapxWqd/VmJhVs1J9cWg= MIME-Version: 1.0 X-Received: by 10.194.178.70 with SMTP id cw6mr88047771wjc.73.1451775190217; Sat, 02 Jan 2016 14:53:10 -0800 (PST) Received: by 10.194.85.167 with HTTP; Sat, 2 Jan 2016 14:53:10 -0800 (PST) In-Reply-To: References: Date: Sat, 2 Jan 2016 23:53:10 +0100 Message-ID: Subject: Re: Getting a core dump of a process without killing it? From: Oliver Pinter To: Dieter BSD Cc: "freebsd-hackers@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Jan 2016 22:53:12 -0000 On Saturday, January 2, 2016, Dieter BSD wrote: > I have a (stopped) process which hopefully has some data in its > memory. > > Is there a way to get a core dump of a process without killing it? > > Looked in kern_sig.c but it appears that any signal that gives a > core dump also kills the process. > > Created a similar process, sent it a SIGTRAP, looked at the core dump > with hexdump and found the data. But of course SIGTRAP also kills the > process. > > Gdb can attach to a process and dump areas of memory, > (dump memory filename addr1 addr2) if you can figure > out what address range(s) you want. I tried "maint info sections" > but no joy. Use too large a range with "dump memory" and > gdb fails. There doesn't seem to be a dump everything option. > > FreeBSD 8.2 [ because 10.1 doesn't work :-( ] on amd64 > ps reports that VSZ is 108104. Take a look at gcore command. > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org > " >