FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Crash Utility

 
 
LinkBack Thread Tools
 
Old 09-29-2010, 01:14 PM
Per Fransson
 
Default minor bug in get_text_init_space

Hi,

I believe the ARM support introduced a minor issue in the function
get_text_init_space(). As it stands, the error "cannot determine text
init space" can only occur when machine_type("ARM") is true. Here a
suggested fix.

Regards,
Per

--- a/symbols.c
+++ b/symbols.c
@@ -491,9 +491,9 @@ get_text_init_space(void)

******* if (((section = get_kernel_section(".text.init")) == NULL) &&
*********** ((section = get_kernel_section(".init.text")) == NULL) &&
-********** (machine_type("ARM") && (section =
get_kernel_section(".init")) == NULL)) {
-************** error(WARNING, "cannot determine text init space
");
-************** return;
+********** !(machine_type("ARM") && (section =
get_kernel_section(".init")) != NULL)) {
+********** error(WARNING, "cannot determine text init space
");
+********** return;
******* }

********kt->stext_init = (ulong)bfd_get_section_vma(st->bfd, section);

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
 
Old 09-29-2010, 01:44 PM
Dave Anderson
 
Default minor bug in get_text_init_space

----- "Per Fransson" <perr.fransson.ml@gmail.com> wrote:

> Hi,
>
> I believe the ARM support introduced a minor issue in the function
> get_text_init_space(). As it stands, the error "cannot determine text
> init space" can only occur when machine_type("ARM") is true. Here a
> suggested fix.
>
> Regards,
> Per

Definitely a bug -- thanks for catching that.

I remember looking at that ARM-support patch submission and thinking
that for maintainability/sanity purposes it should probably just be
separated out entirely for ARM.

Thanks again,
Dave

>
> --- a/symbols.c
> +++ b/symbols.c
> @@ -491,9 +491,9 @@ get_text_init_space(void)
>
> ******* if (((section = get_kernel_section(".text.init")) == NULL) &&
> *********** ((section = get_kernel_section(".init.text")) == NULL) &&
> -********** (machine_type("ARM") && (section = get_kernel_section(".init")) == NULL)) {
> -************** error(WARNING, "cannot determine text init space
");
> -************** return;
> +********** !(machine_type("ARM") && (section = get_kernel_section(".init")) != NULL)) {
> +********** error(WARNING, "cannot determine text init space
");
> +********** return;
> ******* }
>
> ********kt->stext_init = (ulong)bfd_get_section_vma(st->bfd, section);
>
> --
> Crash-utility mailing list
> Crash-utility@redhat.com
> https://www.redhat.com/mailman/listinfo/crash-utility

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
 
Old 09-29-2010, 01:58 PM
Dave Anderson
 
Default minor bug in get_text_init_space

----- "Dave Anderson" <anderson@redhat.com> wrote:

> ----- "Per Fransson" <perr.fransson.ml@gmail.com> wrote:
>
> > Hi,
> >
> > I believe the ARM support introduced a minor issue in the function
> > get_text_init_space(). As it stands, the error "cannot determine text
> > init space" can only occur when machine_type("ARM") is true. Here a
> > suggested fix.
> >
> > Regards,
> > Per
>
> Definitely a bug -- thanks for catching that.
>
> I remember looking at that ARM-support patch submission and thinking
> that for maintainability/sanity purposes it should probably just be
> separated out entirely for ARM.

Like this:

--- symbols.c 7 Sep 2010 20:46:53 -0000 1.214
+++ symbols.c 29 Sep 2010 13:52:37 -0000
@@ -489,9 +489,11 @@
if (pc->flags & SYSMAP)
return;

- if (((section = get_kernel_section(".text.init")) == NULL) &&
- ((section = get_kernel_section(".init.text")) == NULL) &&
- (machine_type("ARM") && (section = get_kernel_section(".init")) == NULL)) {
+ if (machine_type("ARM"))
+ section = get_kernel_section(".init");
+ else if ((section = get_kernel_section(".text.init")) == NULL)
+ section = get_kernel_section(".init.text");
+ if (!section) {
error(WARNING, "cannot determine text init space
");
return;
}

Thanks again Per,
Dave

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
 

Thread Tools




All times are GMT. The time now is 06:58 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org