Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760349AbZGIKvA (ORCPT ); Thu, 9 Jul 2009 06:51:00 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756647AbZGIKuv (ORCPT ); Thu, 9 Jul 2009 06:50:51 -0400 Received: from web15703.mail.cnb.yahoo.com ([202.165.102.70]:27995 "HELO web15703.mail.cnb.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1754661AbZGIKuu (ORCPT ); Thu, 9 Jul 2009 06:50:50 -0400 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com.cn; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=oUxy+65L1eLq6PYRZR412OflxwHNcb/Xd9B4/zXaE1dBn56qi3m95ZWF8sNemk9Zdi3Z/I++rbnbkEWFaCQjH1X2nE5J9NiUbCxVF5nRZNUaYvG6OO8sGYrw8D7yoqlkGJLib0DVcpAKv8d/rM3cm1HYPssZImcX/vsjQoNavZo=; Message-ID: <789976.67811.qm@web15703.mail.cnb.yahoo.com> X-YMail-OSG: KFSAWuoVM1ncdWbV6kwCUHYLbBcASRgM3jf.q_luaYrCF8Mp4vzu9DD.yzvNyeOJCJKV8upb4_H59oQWPdfgXCpxik7QaXHXVuNCVChWfNTkZOLyDnJBJmCS7faUuyxkj.mflkqqjD_UeWvIQtLw97OaIZPg0fnORvuW7WmS04tuK38- X-Mailer: YahooMailClassic/5.4.17 YahooMailWebService/0.7.289.15 Date: Thu, 9 Jul 2009 18:50:47 +0800 (CST) From: peter meng Subject: Ask a question related Assemble and C revert within vmlinux ? To: linux-kernel@vger.kernel.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2592 Lines: 85 Hi I compile the linux kernel with mips . Is there any tools let the Assemble code correspond to C code ? I mean Assemble line correspond to C line . ----------------cut from objdump -S vmlinux ---------------------- 801b5b40 : 801b5b40: 27bdffc0 addiu sp,sp,-64 801b5b44: afb00028 sw s0,40(sp) 801b5b48: afbf0038 sw ra,56(sp) 801b5b4c: afb30034 sw s3,52(sp) 801b5b50: afb20030 sw s2,48(sp) 801b5b54: afb1002c sw s1,44(sp) 801b5b58: 8c82006c lw v0,108(a0) 801b5b5c: 3c0300e0 lui v1,0xe0 801b5b60: 3c050060 lui a1,0x60 801b5b64: 00431024 and v0,v0,v1 801b5b68: 10450022 beq v0,a1,801b5bf4 801b5b6c: 00808021 move s0,a0 801b5b70: 3c128029 lui s2,0x8029 801b5b74: 8e42ef90 lw v0,-4208(s2) 801b5b78: 00808821 move s1,a0 801b5b7c: 8c430004 lw v1,4(v0) 801b5b80: 24630001 addiu v1,v1,1 801b5b84: ac430004 sw v1,4(v0) 801b5b88: 8c850078 lw a1,120(a0) 801b5b8c: 38a50001 xori a1,a1,0x1 801b5b90: 14a00027 bnez a1,801b5c30 801b5b94: 00000000 nop 801b5b98: 122000d6 beqz s1,801b5ef4 801b5b9c: 02208021 move s0,s1 801b5ba0: 8e250058 lw a1,88(s1) ........ ----------------------ip_rcv source code --------------- int ip_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev) { struct iphdr *iph; u32 len; /* When the interface is in promisc. mode, drop all the crap * that it receives, do not try to analyse it. */ if (skb->pkt_type == PACKET_OTHERHOST) goto drop; IP_INC_STATS_BH(IPSTATS_MIB_INRECEIVES); if ((skb = skb_share_check(skb, GFP_ATOMIC)) == NULL) { IP_INC_STATS_BH(IPSTATS_MIB_INDISCARDS); goto out; } if (!pskb_may_pull(skb, sizeof(struct iphdr))) goto inhdr_error; iph = skb->nh.iph; if (iph->ihl < 5 || iph->version != 4) goto inhdr_error; if (!pskb_may_pull(skb, iph->ihl*4)) goto inhdr_error; iph = skb->nh.iph; ............. Thanks a lot . Best Regards. Peter Meng -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/