[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: new version of binutils does not print source with disassemble
From: |
Russell Cattelan |
Subject: |
Re: new version of binutils does not print source with disassemble |
Date: |
19 Dec 2001 10:49:54 -0600 |
On Tue, 2001-12-18 at 04:45, Nick Clifton wrote:
> Hi Russell,
>
> > This is a simple little script that dumps out
> > the disassembly intermixed with the source code.
> > The parameters match the stack strace of kdb (linux kernel debugger)
> >
> > It works fine with binutils
> > ib4[2:27pm]-=>objdump --version
> > GNU objdump 2.10.91
> >
> > scare[1:09pm]-=>objdump --version
> > GNU objdump 2.11.92.0.7 20011016
> >
> > Has something simple and non obvious changed?
>
> What goes wrong with the new version ?
The source is no longer displayed.
> Which host and which target are you using ?
This is on linux i386
non working
Linux version 2.4.16-xfs (address@hidden) (gcc version 2.96 20000731
(Mandrake Linux 8.2 2.96-0.68mdk)) #26 SMP Wed Dec 12 16:36:51 CST 2001
working
Linux version 2.4.4-64GB-SMP (address@hidden) (gcc version 2.95.3
20010315 (SuSE)) #1 SMP Fri May 18 14:54:08 GMT 2001
>
> Cheers
> Nick
version 2.11
drive[10:45am]#odump dafsdev .text 0xe133e060 0xe135a990 0xe135aa50
+ '[' dafsdev = kernel ']'
+ find linux -name dafsdev.o -print
find: linux: No such file or directory
+ objdump --source -j .text --adjust-vma=0xe133e060
--start-address=0xe135a990 --stop-address=0xe135aa50 dafsdev.o
dafsdev.o: file format elf32-i386
Disassembly of section .text:
e135a990 <KPostSend+0x20>:
e135a990: 00 00 add %al,(%eax)
e135a992: 53 push %ebx
e135a993: 8b 48 04 mov 0x4(%eax),%ecx
e135a996: 51 push %ecx
e135a997: 68 00 00 00 00 push $0x0
e135a99c: 6a 00 push $0x0
e135a99e: 68 00 00 00 00 push $0x0
e135a9a3: e8 fc ff ff ff call e135a9a4 <KPostSend+0x34>
e135a9a8: 8b 94 24 d4 00 00 00 mov 0xd4(%esp,1),%edx
e135a9af: 83 c4 20 add $0x20,%esp
e135a9b2: 66 8b 42 0c mov 0xc(%edx),%ax
e135a9b6: 66 83 f8 01 cmp $0x1,%ax
e135a9ba: 74 34 je e135a9f0 <KPostSend+0x80>
e135a9bc: 25 ff ff 00 00 and $0xffff,%eax
e135a9c1: 52 push %edx
e135a9c2: 52 push %edx
e135a9c3: 50 push %eax
e135a9c4: 68 00 00 00 00 push $0x0
e135a9c9: e8 fc ff ff ff call e135a9ca <KPostSend+0x5a>
e135a9ce: 5d pop %ebp
e135a9cf: 58 pop %eax
e135a9d0: 6a 23 push $0x23
e135a9d2: 68 00 00 00 00 push $0x0
e135a9d7: e8 fc ff ff ff call e135a9d8 <KPostSend+0x68>
e135a9dc: 0f 0b ud2a
e135a9de: 83 c4 10 add $0x10,%esp
e135a9e1: b8 02 00 00 00 mov $0x2,%eax
e135a9e6: e9 1c 01 00 00 jmp e135ab07
<KPostSend+0x197>
e135a9eb: 90 nop
e135a9ec: 8d 74 26 00 lea 0x0(%esi,1),%esi
e135a9f0: 8b bc 24 b4 00 00 00 mov 0xb4(%esp,1),%edi
e135a9f7: 8d 5c 24 10 lea 0x10(%esp,1),%ebx
e135a9fb: b9 03 00 00 00 mov $0x3,%ecx
e135aa00: 89 e8 mov %ebp,%eax
e135aa02: 8b 57 2c mov 0x2c(%edi),%edx
e135aa05: 8b 77 20 mov 0x20(%edi),%esi
e135aa08: 89 df mov %ebx,%edi
e135aa0a: f3 ab repz stos %eax,%es:(%edi)
e135aa0c: 8d 86 00 00 00 40 lea 0x40000000(%esi),%eax
e135aa12: 89 54 24 18 mov %edx,0x18(%esp,1)
e135aa16: 89 44 24 10 mov %eax,0x10(%esp,1)
e135aa1a: c7 44 24 14 87 88 00 movl $0x8887,0x14(%esp,1)
e135aa21: 00
e135aa22: 57 push %edi
e135aa23: 57 push %edi
e135aa24: 52 push %edx
e135aa25: 50 push %eax
e135aa26: 56 push %esi
e135aa27: 68 00 00 00 00 push $0x0
e135aa2c: 6a 00 push $0x0
e135aa2e: 68 00 00 00 00 push $0x0
e135aa33: e8 fc ff ff ff call e135aa34 <KPostSend+0xc4>
e135aa38: 83 c4 20 add $0x20,%esp
e135aa3b: b9 0e 00 00 00 mov $0xe,%ecx
e135aa40: 8d 44 24 20 lea 0x20(%esp,1),%eax
e135aa44: 89 44 24 04 mov %eax,0x4(%esp,1)
e135aa48: 89 c7 mov %eax,%edi
e135aa4a: 89 e8 mov %ebp,%eax
e135aa4c: f3 ab repz stos %eax,%es:(%edi)
e135aa4e: 8b 94 24 b4 00 00 00 mov 0xb4(%esp,1),%edx
version 2.10
ib4[11:57am]-=>odump dafsdev .text 0xe133e060 0xe135a990 0xe135aa50
+ '[' dafsdev = kernel ']'
+ find linux -name dafsdev.o -print
find: linux: No such file or directory
+ objdump --source -j .text --adjust-vma=0xe133e060
--start-address=0xe135a990 --stop-address=0xe135aa50 dafsdev.o
dafsdev.o: file format elf32-i386
Disassembly of section .text:
e135a990 <KPostSend+0x20>:
int status, retv = KVIP_SUCCESS;
uint64_t timeout = (1 << 20); /* some number for qpwait clean
up later */
KTR((&kTrace,0,"ENTER: KPostSend qpH 0x%x cq_h 0x%x length
%d\n",
e135a990: 00 00 add %al,(%eax)
e135a992: 53 push %ebx
e135a993: 8b 48 04 mov 0x4(%eax),%ecx
e135a996: 51 push %ecx
e135a997: 68 00 00 00 00 push $0x0
e135a99c: 6a 00 push $0x0
e135a99e: 68 00 00 00 00 push $0x0
e135a9a3: e8 fc ff ff ff call e135a9a4 <KPostSend+0x34>
vip->qpH, cqp->cq_h, length));
/* assume one sement for now */
if (DescriptorPtr->CS.SegCount != 1){
e135a9a8: 8b 94 24 d4 00 00 00 mov 0xd4(%esp,1),%edx
e135a9af: 83 c4 20 add $0x20,%esp
e135a9b2: 66 8b 42 0c mov 0xc(%edx),%ax
e135a9b6: 66 83 f8 01 cmp $0x1,%ax
e135a9ba: 74 34 je e135a9f0 <KPostSend+0x80>
printk("KPostSend only supports one segment for now
%d\n",DescriptorPtr->CS.SegCount);
e135a9bc: 25 ff ff 00 00 and $0xffff,%eax
e135a9c1: 52 push %edx
e135a9c2: 52 push %edx
e135a9c3: 50 push %eax
e135a9c4: 68 00 00 00 00 push $0x0
e135a9c9: e8 fc ff ff ff call e135a9ca <KPostSend+0x5a>
BUG();
e135a9ce: 5d pop %ebp
e135a9cf: 58 pop %eax
e135a9d0: 6a 23 push $0x23
e135a9d2: 68 00 00 00 00 push $0x0
e135a9d7: e8 fc ff ff ff call e135a9d8 <KPostSend+0x68>
e135a9dc: 0f 0b ud2a
e135a9de: 83 c4 10 add $0x10,%esp
retv = KVIP_INVALID_PARAMETER;
return retv;
e135a9e1: b8 02 00 00 00 mov $0x2,%eax
e135a9e6: e9 1c 01 00 00 jmp e135ab07
<KPostSend+0x197>
e135a9eb: 90 nop
e135a9ec: 8d 74 26 00 lea 0x0(%esi,1),%esi
}
length = DescriptorPtr->DS[0].Local.Length;
e135a9f0: 8b bc 24 b4 00 00 00 mov 0xb4(%esp,1),%edi
* This looks horribly ugly, but the compiler can optimize it totally,
* as we by now know that both pattern and count is constant..
*/
static inline void * __constant_c_and_count_memset(void * s, unsigned
long pattern, size_t count)
{
e135a9f7: 8d 5c 24 10 lea 0x10(%esp,1),%ebx
switch (count) {
case 0:
return s;
case 1:
*(unsigned char *)s = pattern;
return s;
case 2:
*(unsigned short *)s = pattern;
return s;
case 3:
*(unsigned short *)s = pattern;
*(2+(unsigned char *)s) = pattern;
return s;
case 4:
*(unsigned long *)s = pattern;
return s;
}
#define COMMON(x) \
__asm__ __volatile__( \
"rep ; stosl" \
x \
: "=&c" (d0), "=&D" (d1) \
: "a" (pattern),"0" (count/4),"1" ((long) s) \
: "memory")
{
int d0, d1;
switch (count % 4) {
case 0: COMMON(""); return s;
e135a9fb: b9 03 00 00 00 mov $0x3,%ecx
e135aa00: 89 e8 mov %ebp,%eax
e135aa02: 8b 57 2c mov 0x2c(%edi),%edx
address = (void
*)(ptr_to_uint)DescriptorPtr->DS[0].Local.Data.AddressBits;
e135aa05: 8b 77 20 mov 0x20(%edi),%esi
: "memory")
{
int d0, d1;
switch (count % 4) {
case 0: COMMON(""); return s;
e135aa08: 89 df mov %ebx,%edi
e135aa0a: f3 ab repz stos %eax,%es:(%edi)
* These are pretty trivial
*/
static inline unsigned long virt_to_phys(volatile void * address)
{
return __pa(address);
e135aa0c: 8d 86 00 00 00 40 lea 0x40000000(%esi),%eax
/* Create the gather/scatter list. */
memset((void *)&glist, 0, sizeof(Cal_scatgat_entry_t));
glist.local_address = (void *)virt_to_bus(address);
glist.byte_count = length;
e135aa12: 89 54 24 18 mov %edx,0x18(%esp,1)
e135aa16: 89 44 24 10 mov %eax,0x10(%esp,1)
glist.local_key = 0x8887;
e135aa1a: c7 44 24 14 87 88 00 movl $0x8887,0x14(%esp,1)
e135aa21: 00
#if 0
{ int i ;
uint8_t *ptr = address;
for(i=0; i < length; i++){
if(!(i % 16)) printk("\n");
printk("0x%.2x %c ",*ptr, *ptr++);
}
printk("\n");
}
#endif
KTR((&kTrace, 0 ,"KPostSend: address 0x%p phy_addr 0x%p length
%d\n",
e135aa22: 57 push %edi
e135aa23: 57 push %edi
e135aa24: 52 push %edx
e135aa25: 50 push %eax
e135aa26: 56 push %esi
e135aa27: 68 00 00 00 00 push $0x0
e135aa2c: 6a 00 push $0x0
e135aa2e: 68 00 00 00 00 push $0x0
e135aa33: e8 fc ff ff ff call e135aa34 <KPostSend+0xc4>
address,glist.local_address,glist.byte_count));
/* fill in the cal request */
memset((void *)&wr, 0, sizeof(Cal_wr_t));
e135aa38: 83 c4 20 add $0x20,%esp
: "memory")
{
int d0, d1;
switch (count % 4) {
case 0: COMMON(""); return s;
e135aa3b: b9 0e 00 00 00 mov $0xe,%ecx
e135aa40: 8d 44 24 20 lea 0x20(%esp,1),%eax
e135aa44: 89 44 24 04 mov %eax,0x4(%esp,1)
e135aa48: 89 c7 mov %eax,%edi
e135aa4a: 89 e8 mov %ebp,%eax
e135aa4c: f3 ab repz stos %eax,%es:(%edi)
/* work_request_id is a 64 bit value... for what reason
* I don't know! but we are going to use it as an
* opaque pointer
*/
wr.work_request_id = (Cal_wrid_t)(ptr_to_uint)DescriptorPtr;
e135aa4e: 8b 94 24 b4 00 00 00 mov 0xb4(%esp,1),%edx