Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: qinwei<qinwei@sunnorth.com.cn>
To: gdb@sourceware.org
Subject: How to avoid "but contains no code." in command "info line"?
Date: Fri, 23 Mar 2007 07:22:00 -0000	[thread overview]
Message-ID: <OF59439A6E.C25A10FF-ON482572A7.00264C6A-482572A7.00286B8B@sunnorth.com.cn> (raw)

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


             reply	other threads:[~2007-03-23  7:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-23  7:22 qinwei [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=OF59439A6E.C25A10FF-ON482572A7.00264C6A-482572A7.00286B8B@sunnorth.com.cn \
    --to=qinwei@sunnorth.com.cn \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox