Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* How to avoid "but contains no code." in command "info line"?
@ 2007-03-23  7:22 qinwei
  2007-03-23 11:58 ` Daniel Jacobowitz
  0 siblings, 1 reply; 5+ messages in thread
From: qinwei @ 2007-03-23  7:22 UTC (permalink / raw)
  To: gdb

Dears, problems are here:

In a assembly file 'a.s', we define two sections which have code both.
For example:

line1: .section mysection
line2: load r4, [r3]
line3: jump func
......

line6: .text
line7: store r4, [r3]
line8: jump func
......

"info line a.s:7" will print both the begin and end address of the line.
but "info line a.s:2" just print the begin address and "but contains no 
code."

I trace the behavior of gdb (6.6 release) and find if the code is not in 
.text, 
then it will not be put to the 'blockvector structure' and finally the 
branch in
gdb/source.c is taken. Does gdb have commands to let codes that in user 
defined
sections tobe added to the 'blockvector structure' and "info line" will 
print 
both the begin & end address? Thanks!

      if (start_pc == end_pc) 
        { 
          printf_filtered ("Line %d of \"%s\"",
                   sal.line, sal.symtab->filename);
          wrap_here ("  "); 
          printf_filtered (" is at address ");
          print_address (start_pc, gdb_stdout);
          wrap_here ("  "); 
          printf_filtered (" but contains no code.\n");
        } 

Best regards,
Qinwei
Mail  qinwei@sunnorth.com.cn
Phone +86-010-62981668-2708
Fax   +86-010-62985972


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

end of thread, other threads:[~2007-03-28  2:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-23  7:22 How to avoid "but contains no code." in command "info line"? qinwei
2007-03-23 11:58 ` Daniel Jacobowitz
2007-03-27  4:08   ` qinwei
2007-03-27 11:16     ` Daniel Jacobowitz
2007-03-28  2:46       ` qinwei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox