All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mahesh Jagannath Salgaonkar <mahesh@linux.vnet.ibm.com>
To: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
Cc: V Srivatsa <vsrivatsa@in.ibm.com>,
	Ananth N Mavinakayanahalli <ananth@in.ibm.com>,
	kexec@lists.infradead.org, Dave Anderson <anderson@redhat.com>,
	Prerna Saxena <prerna@linux.vnet.ibm.com>,
	Reinhard <BUENDGEN@de.ibm.com>
Subject: Re: [PATCH v2 4/8] makedumpfile: Introduce routines to get type name from debuginfo.
Date: Thu, 04 Aug 2011 12:13:22 +0530	[thread overview]
Message-ID: <4E3A3F8A.8090204@linux.vnet.ibm.com> (raw)
In-Reply-To: <20110801102704.efc244ac.oomichi@mxs.nes.nec.co.jp>

Hi Ken'ichi,

On 08/01/2011 06:57 AM, Ken'ichi Ohmichi wrote:
> 
> Hi Mahesh,
> 
> A pointer size can been gotton by sizeof(void *), and pointer (virtual 
> address) can been defined as "unsigned long".
> I think we can make this patch simple. How about the attached patch ?
> 

Yup, the patch looks simpler and good.

> 
> Thanks
> Ken'ichi Ohmichi
> 
> diff --git a/makedumpfile.c b/makedumpfile.c
> index 3ad2bd5..6955f64 100644
> --- a/makedumpfile.c
> +++ b/makedumpfile.c
> @@ -34,7 +34,6 @@ struct erase_info	*erase_info = NULL;
>  unsigned long		num_erase_info = 1; /* Node 0 is unused. */
> 
>  char filename_stdout[] = FILENAME_STDOUT;
> -long pointer_size;
>  char config_buf[BUFSIZE_FGETS];
> 
>  /*
> @@ -2058,10 +2057,6 @@ get_debug_info(void)
>  	 */
>  	while (dwarf_nextcu(dwarfd, off, &next_off, &header_size,
>  	    &abbrev_offset, &address_size, &offset_size) == 0) {
> -		if (dwarf_info.cmd == DWARF_INFO_GET_PTR_SIZE) {
> -			dwarf_info.struct_size = address_size;
> -			break;
> -		}
>  		off += header_size;
>  		if (dwarf_offdie(dwarfd, off, &cu_die) == NULL) {
>  			ERRMSG("Can't get CU die.\n");

[...]

> @@ -7863,8 +7849,8 @@ print_config_entry(struct config_entry *ce)
>  		DEBUG_MSG("Type Name: %s, ", ce->type_name);
>  		DEBUG_MSG("flag: %x, ", ce->flag);
>  		DEBUG_MSG("Type flag: %lx, ", ce->type_flag);
> -		DEBUG_MSG("sym_addr: %llx, ", ce->sym_addr);
> -		DEBUG_MSG("addr: %llx, ", ce->addr);
> +		DEBUG_MSG("sym_addr: %lx, ", ce->sym_addr);

Above change throws compilation warning. The sym_addr is unsigned long
long, %llx still holds good.

> +		DEBUG_MSG("addr: %lx, ", ce->addr);
>  		DEBUG_MSG("offset: %lx, ", ce->offset);
>  		DEBUG_MSG("size: %zd\n", ce->size);
> 

[...]

> @@ -1284,7 +1283,7 @@ struct config_entry {
>  	unsigned short		flag;
>  	unsigned short		nullify;
>  	unsigned long long	sym_addr;	/* Symbol address */
> -	unsigned long long	addr;		/* Symbol address or
> +	unsigned long		addr;		/* Symbol address or
>  						   value pointed by sym_addr */
>  	unsigned long long	cmp_addr;	/* for LIST_ENTRY */
>  	unsigned long		offset;
> 

I tested this patch and works fine.

Thanks,
-Mahesh.

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

  reply	other threads:[~2011-08-04  6:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-17 20:03 [PATCH v2 4/8] makedumpfile: Introduce routines to get type name from debuginfo Mahesh J Salgaonkar
2011-08-01  1:27 ` Ken'ichi Ohmichi
2011-08-04  6:43   ` Mahesh Jagannath Salgaonkar [this message]
2011-08-05  0:26     ` Ken'ichi Ohmichi

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=4E3A3F8A.8090204@linux.vnet.ibm.com \
    --to=mahesh@linux.vnet.ibm.com \
    --cc=BUENDGEN@de.ibm.com \
    --cc=ananth@in.ibm.com \
    --cc=anderson@redhat.com \
    --cc=kexec@lists.infradead.org \
    --cc=oomichi@mxs.nes.nec.co.jp \
    --cc=prerna@linux.vnet.ibm.com \
    --cc=vsrivatsa@in.ibm.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.