From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752463AbcISTPp (ORCPT ); Mon, 19 Sep 2016 15:15:45 -0400 Received: from mail-oi0-f66.google.com ([209.85.218.66]:33553 "EHLO mail-oi0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752098AbcISTPn (ORCPT ); Mon, 19 Sep 2016 15:15:43 -0400 MIME-Version: 1.0 In-Reply-To: References: <20160915072425.GN5008@twins.programming.kicks-ass.net> <20160915121014.ox5ytlplt7wz5cpk@treble> <20160916144807.6yrdznupo3bpe5b2@treble> <20160916191738.v3kq3c44zmdsvlgb@treble> <20160916212656.bnmxrl3cglsbjmpm@treble> <20160917004212.tsr3taygbcidvgl5@treble> <20160919155214.ap2cgwjkjn2s7itr@treble> From: Linus Torvalds Date: Mon, 19 Sep 2016 12:15:42 -0700 X-Google-Sender-Auth: hbWT88bGe3hAv6wgY21R0DHpdtw Message-ID: Subject: Re: [PATCH v3] scripts: add script for translating stack dump function To: Josh Poimboeuf Cc: Peter Zijlstra , Stephane Eranian , Vince Weaver , LKML , Alexander Shishkin , Ingo Molnar , Kees Cook , Rabin Vincent , Vegard Nossum Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 19, 2016 at 11:56 AM, Linus Torvalds wrote: >> >> The only working (and fast) approach I could come up with was an ugly >> hack. It assumes that start_kernel() is in init/main.c. > > That sounds entirely reasonable. Maybe somebody can come up with a > better and more general approach, but that sounds like a fine starting > point, and any incremental improvents can happen in the tree. So I'll > apply your patch (assuming it passes my basic testing, which I expect > it will). Hmm. Would you mind if I change the addr2line -fpie $objfile $hexaddr | sed "s;$dir_prefix;;" into addr2line -fpie $objfile $hexaddr | sed "s; at $dir_prefix\(\./\)*; at ;" instead? There's two changes there: matching the " at " part (to just make the match stricter) but also matching any following "./" thing (which shows up for our include tree files, at least for me). With that, all the cases I threw at it looked pretty good. But the stricter matching might not matter, of course, and maybe there is some addr2line version that doesn't do that? So I'm checking here.. Linus