[haiku-commits] Re: r39826 - in haiku/trunk/src/apps/debugger: . debug_info elf

  • From: Ingo Weinhold <ingo_weinhold@xxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 13 Dec 2010 16:51:37 +0100

On 2010-12-13 at 15:05:45 [+0100], anevilyak@xxxxxxxxx wrote:
> Modified: haiku/trunk/src/apps/debugger/elf/ElfFile.cpp
> ===================================================================
> --- haiku/trunk/src/apps/debugger/elf/ElfFile.cpp    2010-12-13 11:58:15 
> UTC (rev 39825)
> +++ haiku/trunk/src/apps/debugger/elf/ElfFile.cpp    2010-12-13 14:05:44 
> UTC (rev 39826)
> @@ -293,6 +293,19 @@
>  }
>  
>  
> +ElfSection*
> +ElfFile::FindSection(const char* name) const
> +{
> +    for (SectionList::ConstIterator it = fSections.GetIterator();
> +            ElfSection* section = it.Next();) {
> +        if (strcmp(section->Name(), name) == 0)
> +            return section;
> +    }
> +
> +    return NULL;
> +}

Sorry, me again. It would be nice to have GetSection() use FindSection() to 
avoid the code duplication.

CU, Ingo

Other related posts: