From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 111328 invoked by alias); 25 Jan 2016 14:06:10 -0000 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 Received: (qmail 111317 invoked by uid 89); 25 Jan 2016 14:06:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=sk:google, sk:google-, trimmed, sharedlibrary X-HELO: mail-wm0-f45.google.com Received: from mail-wm0-f45.google.com (HELO mail-wm0-f45.google.com) (74.125.82.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 25 Jan 2016 14:06:08 +0000 Received: by mail-wm0-f45.google.com with SMTP id r129so65437037wmr.0 for ; Mon, 25 Jan 2016 06:06:08 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=0Eh6N3lU33BZN/GsjktgT0kJ2fBlcfxuDCQbExjbfD8=; b=gR+kuW5fV5HPdh1I/8Ra4s0Y21hUhjq++9/pkXaGHgzyCIbKAfFK1zhZ5Yawrfx80u id/jca7AjQuCfdeaVvQqLXyW0Sqp/xmBkN6GYSrjZd5TN9mNIOX+Ipp/yTbbMIvq6lRd v1zJfmY/BM9VijAslhFQGITlL192dkWgZEeKmkOd+fob2bKkAz2zTdQi9wigobufLa7M btHvjylKU38nfpdOaihxfO0DliLLCorD/fQ3Ax6vMdqukI1tCtDHmtEuZj5K7LI58HB5 3Mr8X/bQZk30PGGHG8g3aCsqwwKilo8S0rYfqLNuqVybU5x09XL6qYNcBPRiQOUjw8QN 9/Zw== X-Gm-Message-State: AG10YOQnzvptEWfr3hU/hWauz1R7/PFWvHeuJbUWVaWCT2C9mGrX1UuFu7jyIQ+qWJDSQs7PAAWOV3sX5g6Y9g== MIME-Version: 1.0 X-Received: by 10.194.117.169 with SMTP id kf9mr17616251wjb.122.1453730765705; Mon, 25 Jan 2016 06:06:05 -0800 (PST) Received: by 10.194.166.162 with HTTP; Mon, 25 Jan 2016 06:06:05 -0800 (PST) Date: Mon, 25 Jan 2016 14:06:00 -0000 Message-ID: Subject: Adding a missing NT_FILES note to a core file so gdb can load solibs for it From: Bogdan Harjoc To: gdb@sourceware.org Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2016-01/txt/msg00050.txt.bz2 I received some mips core files from an openwrt machine where all .so's are sstripped: all the sections at the end are trimmed except those strictly needed to run programs. All standard openwrt images are built like this. Reading the core files with readelf doesn't show any NT_FILES note, and from stepping through the code, it seems this causes solib_svr4_r_map() to fail, and "info sharedlibrary" shows nothing of course. I'm about to add that missing section back to the core file hoping it will fix the automating loading of solibs. Google-coredumper [1] looks like a good start for this, and cores are ELF files anyway. The load addresses will be taken from the mapping that "info proc mappings" outputs, it seems to be the same information. [1] https://code.google.com/p/google-coredumper So I'd like to ask whether this has any chance of working. Thanks, Bogdan