public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Bug in MI command -data-dissasemble ??
@ 2006-03-01  4:03 Carlos Eduardo Rodrigues de Almeida
  2006-03-03  0:51 ` Nick Roberts
  2006-03-03 17:21 ` Carlos Eduardo Rodrigues de Almeida
  0 siblings, 2 replies; 7+ messages in thread
From: Carlos Eduardo Rodrigues de Almeida @ 2006-03-01  4:03 UTC (permalink / raw)
  To: gdb

Hi all,
I was trying the -data-disassemble command and I found something strange.
I think with a session I can explain better:


[eduardo@~/lab3/Debug]$gdb -i=mi2
~"GNU gdb 6.4\n"
~"Copyright 2005 Free Software Foundation, Inc.\n"
~"GDB is free software, covered by the GNU General Public License, and
you are\n"
~"welcome to change it and/or distribute copies of it under certain
conditions.\n"
~"Type \"show copying\" to see the conditions.\n"
~"There is absolutely no warranty for GDB.  Type \"show warranty\" for
details.\n"
~"This GDB was configured as \"x86_64-pc-linux-gnu\"."
~"\n"
(gdb)
-file-exec-and-symbols lab3
~"Using host libthread_db library \"/lib/libthread_db.so.1\".\n"
^done
(gdb)
-data-disassemble -f /home/eduardo/libgip/src/gip_app.cpp -l 68 -n 1 -- 1
&"mi_cmd_disassemble: Invalid line number\n"
^error,msg="mi_cmd_disassemble: Invalid line number"
(gdb)
-data-disassemble -f gip_app.cpp -l 68 -n 1 -- 1
^done,asm_insns=[{address="0x000000000040d7e0",func-name="_Z12gip_app_initPc",offset="0",inst="mov
   %rbx,0xfffffffffffffff0(%rsp)"}]
(gdb)
-data-disassemble -f /home/eduardo/libgip/src/gip_app1.cpp -l 68 -n 1 -- 1
&"mi_cmd_disassemble: Invalid filename.\n"
^error,msg="mi_cmd_disassemble: Invalid filename."
(gdb)


The gip_app.cpp is a file of a library I used to compile lab3.
When I use the complete path (/home/eduardo/libgip/src/gip_app.cpp)
GDB gives me error messge invalid LINE number. When I use only the
file name(gip_app.cpp) the disassemble works. The path is right
because when I specify a wrong file GDB gives me another
message(Invalid filename)

I think this is a bug.. at least the message is wrong.. the line
number is valid.

Thank you,
Eduardo

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Bug in MI command -data-dissasemble ??
  2006-03-01  4:03 Bug in MI command -data-dissasemble ?? Carlos Eduardo Rodrigues de Almeida
@ 2006-03-03  0:51 ` Nick Roberts
  2006-03-03 17:21 ` Carlos Eduardo Rodrigues de Almeida
  1 sibling, 0 replies; 7+ messages in thread
From: Nick Roberts @ 2006-03-03  0:51 UTC (permalink / raw)
  To: Carlos Eduardo Rodrigues de Almeida; +Cc: gdb

 ...
 > -data-disassemble -f /home/eduardo/libgip/src/gip_app.cpp -l 68 -n 1 -- 1
 > &"mi_cmd_disassemble: Invalid line number\n"
 > ^error,msg="mi_cmd_disassemble: Invalid line number"
 > (gdb)
 > -data-disassemble -f gip_app.cpp -l 68 -n 1 -- 1
 > ^done,asm_insns=[{address="0x000000000040d7e0",func-name="_Z12gip_app_initPc",offset="0",inst="mov
 >    %rbx,0xfffffffffffffff0(%rsp)"}]
 > (gdb)
 > -data-disassemble -f /home/eduardo/libgip/src/gip_app1.cpp -l 68 -n 1 -- 1
 > &"mi_cmd_disassemble: Invalid filename.\n"
 > ^error,msg="mi_cmd_disassemble: Invalid filename."
 > (gdb)
 > 
 > 
 > The gip_app.cpp is a file of a library I used to compile lab3.
 > When I use the complete path (/home/eduardo/libgip/src/gip_app.cpp)
 > GDB gives me error messge invalid LINE number. When I use only the
 > file name(gip_app.cpp) the disassemble works. The path is right
 > because when I specify a wrong file GDB gives me another
 > message(Invalid filename)
 > 
 > I think this is a bug.. at least the message is wrong.. the line
 > number is valid.

It is also odd that you specified mixed source and disassembly (--1) but got
only disassembly in the output (--0).  Perhaps it has something to with 64 bit
opeartion.  It seems to work fine for me with i686-pc-linux-gnu.

Incidently, for Emacs I currently just use the CLI command "disassemble".


-- 
Nick                                           http://www.inet.net.nz/~nickrob

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Bug in MI command -data-dissasemble ??
  2006-03-01  4:03 Bug in MI command -data-dissasemble ?? Carlos Eduardo Rodrigues de Almeida
  2006-03-03  0:51 ` Nick Roberts
@ 2006-03-03 17:21 ` Carlos Eduardo Rodrigues de Almeida
  2006-03-03 17:22   ` Daniel Jacobowitz
  1 sibling, 1 reply; 7+ messages in thread
From: Carlos Eduardo Rodrigues de Almeida @ 2006-03-03 17:21 UTC (permalink / raw)
  To: gdb

Hi all,
I'll try to figure out what is going on.. Is there some document that
describes the organization of the GDB code?? Is there some place where
I can grab more information?

Thank you.

Eduardo
On 3/1/06, Carlos Eduardo Rodrigues de Almeida
<eduardo.almeida@gmail.com> wrote:
> Hi all,
> I was trying the -data-disassemble command and I found something strange.
> I think with a session I can explain better:
>
>
> [eduardo@~/lab3/Debug]$gdb -i=mi2
> ~"GNU gdb 6.4\n"
> ~"Copyright 2005 Free Software Foundation, Inc.\n"
> ~"GDB is free software, covered by the GNU General Public License, and
> you are\n"
> ~"welcome to change it and/or distribute copies of it under certain
> conditions.\n"
> ~"Type \"show copying\" to see the conditions.\n"
> ~"There is absolutely no warranty for GDB.  Type \"show warranty\" for
> details.\n"
> ~"This GDB was configured as \"x86_64-pc-linux-gnu\"."
> ~"\n"
> (gdb)
> -file-exec-and-symbols lab3
> ~"Using host libthread_db library \"/lib/libthread_db.so.1\".\n"
> ^done
> (gdb)
> -data-disassemble -f /home/eduardo/libgip/src/gip_app.cpp -l 68 -n 1 -- 1
> &"mi_cmd_disassemble: Invalid line number\n"
> ^error,msg="mi_cmd_disassemble: Invalid line number"
> (gdb)
> -data-disassemble -f gip_app.cpp -l 68 -n 1 -- 1
> ^done,asm_insns=[{address="0x000000000040d7e0",func-name="_Z12gip_app_initPc",offset="0",inst="mov
>   %rbx,0xfffffffffffffff0(%rsp)"}]
> (gdb)
> -data-disassemble -f /home/eduardo/libgip/src/gip_app1.cpp -l 68 -n 1 -- 1
> &"mi_cmd_disassemble: Invalid filename.\n"
> ^error,msg="mi_cmd_disassemble: Invalid filename."
> (gdb)
>
>
> The gip_app.cpp is a file of a library I used to compile lab3.
> When I use the complete path (/home/eduardo/libgip/src/gip_app.cpp)
> GDB gives me error messge invalid LINE number. When I use only the
> file name(gip_app.cpp) the disassemble works. The path is right
> because when I specify a wrong file GDB gives me another
> message(Invalid filename)
>
> I think this is a bug.. at least the message is wrong.. the line
> number is valid.
>
> Thank you,
> Eduardo
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Bug in MI command -data-dissasemble ??
  2006-03-03 17:21 ` Carlos Eduardo Rodrigues de Almeida
@ 2006-03-03 17:22   ` Daniel Jacobowitz
  2006-03-03 19:39     ` Carlos Eduardo Rodrigues de Almeida
  2006-03-03 20:11     ` Nick Roberts
  0 siblings, 2 replies; 7+ messages in thread
From: Daniel Jacobowitz @ 2006-03-03 17:22 UTC (permalink / raw)
  To: Carlos Eduardo Rodrigues de Almeida; +Cc: gdb

On Fri, Mar 03, 2006 at 02:21:09PM -0300, Carlos Eduardo Rodrigues de Almeida wrote:
> Hi all,
> I'll try to figure out what is going on.. Is there some document that
> describes the organization of the GDB code?? Is there some place where
> I can grab more information?

There's the GDB internals manual (gdbint.texinfo, format it as info or
pdf or whatever's convenient for you); but, I don't think it has much
to say about MI issues.

-- 
Daniel Jacobowitz
CodeSourcery

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Bug in MI command -data-dissasemble ??
  2006-03-03 17:22   ` Daniel Jacobowitz
@ 2006-03-03 19:39     ` Carlos Eduardo Rodrigues de Almeida
  2006-03-03 19:44       ` Daniel Jacobowitz
  2006-03-03 20:11     ` Nick Roberts
  1 sibling, 1 reply; 7+ messages in thread
From: Carlos Eduardo Rodrigues de Almeida @ 2006-03-03 19:39 UTC (permalink / raw)
  To: Carlos Eduardo Rodrigues de Almeida, gdb

Well... I got the current (6.4) gdb sources and compiled them.
The problem does not happen in the current.
Should I contact someone at gentoo.org?
Eduardo

On 3/3/06, Daniel Jacobowitz <drow@false.org> wrote:
> On Fri, Mar 03, 2006 at 02:21:09PM -0300, Carlos Eduardo Rodrigues de Almeida wrote:
> > Hi all,
> > I'll try to figure out what is going on.. Is there some document that
> > describes the organization of the GDB code?? Is there some place where
> > I can grab more information?
>
> There's the GDB internals manual (gdbint.texinfo, format it as info or
> pdf or whatever's convenient for you); but, I don't think it has much
> to say about MI issues.
>
> --
> Daniel Jacobowitz
> CodeSourcery
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Bug in MI command -data-dissasemble ??
  2006-03-03 19:39     ` Carlos Eduardo Rodrigues de Almeida
@ 2006-03-03 19:44       ` Daniel Jacobowitz
  0 siblings, 0 replies; 7+ messages in thread
From: Daniel Jacobowitz @ 2006-03-03 19:44 UTC (permalink / raw)
  To: Carlos Eduardo Rodrigues de Almeida; +Cc: gdb

On Fri, Mar 03, 2006 at 07:39:01PM +0000, Carlos Eduardo Rodrigues de Almeida wrote:
> Well... I got the current (6.4) gdb sources and compiled them.
> The problem does not happen in the current.
> Should I contact someone at gentoo.org?

Yes, probably.

-- 
Daniel Jacobowitz
CodeSourcery

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Bug in MI command -data-dissasemble ??
  2006-03-03 17:22   ` Daniel Jacobowitz
  2006-03-03 19:39     ` Carlos Eduardo Rodrigues de Almeida
@ 2006-03-03 20:11     ` Nick Roberts
  1 sibling, 0 replies; 7+ messages in thread
From: Nick Roberts @ 2006-03-03 20:11 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: Carlos Eduardo Rodrigues de Almeida, gdb

Daniel Jacobowitz writes:
 > On Fri, Mar 03, 2006 at 02:21:09PM -0300, Carlos Eduardo Rodrigues de Almeida wrote:
 > > Hi all,
 > > I'll try to figure out what is going on.. Is there some document that
 > > describes the organization of the GDB code?? Is there some place where
 > > I can grab more information?
 > 
 > There's the GDB internals manual (gdbint.texinfo, format it as info or
 > pdf or whatever's convenient for you); but, I don't think it has much
 > to say about MI issues.

But I suspect (possibly ignorantly) that the underlying problem is to do with
symbol table information, which the internals manual does describe.  An easy
way to test this might be to look at the output of of the CLI command
disassemble.  Anyway it looks like its not present in current CVS.  Perhaps 64
bit operation is a recent feature.


-- 
Nick                                           http://www.inet.net.nz/~nickrob

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2006-03-03 20:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-01  4:03 Bug in MI command -data-dissasemble ?? Carlos Eduardo Rodrigues de Almeida
2006-03-03  0:51 ` Nick Roberts
2006-03-03 17:21 ` Carlos Eduardo Rodrigues de Almeida
2006-03-03 17:22   ` Daniel Jacobowitz
2006-03-03 19:39     ` Carlos Eduardo Rodrigues de Almeida
2006-03-03 19:44       ` Daniel Jacobowitz
2006-03-03 20:11     ` Nick Roberts

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).