Hauke Fath | 11 Oct 2006 00:30
Picon

gdb on m{,ac}68k?

Hi,

is gdb 5.3 as shipped with -current (4.99.3 mac68k snapshot of 25 Sep 
here) supposed to be workable on m{,ac}68k?

I am trying to debug sysinst on mac68k, and while I can attach to a 
running process, something as simple as setting a breakpoint makes 
gdb dump core with a segmentation fault. Additionally, gdb doesn't 
seem to work under ddd, at all (busy-loops).

	hauke
--

-- 
"It's never straight up and down"     (DEVO)

Aaron J. Grier | 12 Oct 2006 02:33

Re: tracking program counter / assembling objdump output

On Sat, Sep 30, 2006 at 05:10:33PM -0400, SigmFSK <at> aol.com wrote:
> It still would be nice to be able, with GCC, to assemble the output of
> objdump dissassembled executables.  That seems like such an awesome
> feature; I don't know why objdump output is not immediately in
> assemblable  form.

it's not a common use case, since you can objcopy from one format to
another.

have you asked on the binutils mailing list?

--

-- 
  Aaron J. Grier | "Not your ordinary poofy goof." | agrier <at> poofygoof.com
              "silly brewer, saaz are for pils!"  --  virt

David Laight | 12 Oct 2006 08:41
Picon

Re: tracking program counter / assembling objdump output

On Sat, Sep 30, 2006 at 05:10:33PM -0400, SigmFSK <at> aol.com wrote:
>  
> It still would be nice to be able, with GCC, to assemble the output of  
> objdump dissassembled executables.  That seems like such an awesome  feature;
> I don't know why objdump output is not immediately in assemblable  form.

Because it isn't possible.
The disassembler cannot know whether constants should be absolute numbers,
diffences between addresses, or addresses themselves.  So when you
reassemmble the output you'll end up with incorrect code.

	David

--

-- 
David Laight: david <at> l8s.co.uk

SigmFSK | 12 Oct 2006 12:50
Picon
Favicon

Re: tracking program counter / assembling objdump output

In a message dated 10/12/2006 2:45:34 A.M. Eastern Standard Time,  
david <at> l8s.co.uk writes:
Because it isn't possible.
The disassembler cannot  know whether constants should be absolute numbers,
diffences between  addresses, or addresses themselves.  So when you
reassemmble the output  you'll end up with incorrect code.

David
---
Thanks David.  I followed agrier's suggestion last night to ask the  binutils 
mailing list and got a similar response.  I still think it would  be neat to 
make a converter from objdump output to gcc-assemblable source and  have it 
ask for human help when needed, but the more I think about - not neat  enough to 
actually go through the work of doing it.
/arthur

 
> It  appears that the objdump output is quite similar to, but  deliberately 
> different  from, the assembly created from compiling  a c program with "gcc 
-S".
> 
> Is  there a mechanism to  convert the objdump disassembly output to an 
> assemblable   form?

Apart from doing this by hand, no.

> Or is that a deliberate objdump decision to have the output   
> different, as my desire is inherently unworkable,

It was a deliberate decision but the motive was to make disassembler's  
(Continue reading)


Gmane