alexandreyy (Alexandre Yukio Yamashita)
User

Projects

User does not belong to any projects.

User Details

User Since
Aug 16 2017, 1:09 PM (27 w, 14 h)

Recent Activity

Jan 19 2018

alexandreyy added a comment to D41702: Add SysV Abi for PPC64le.

Wait a minute. Is there any reason why we can't add tests now?

Thanks.
We are running the default tests of the lldb suite.
Currently, we have 48 failures that we are working on.
Could we proceed with this patch?
We will send fixes for these issues soon.

Jan 19 2018, 9:22 AM
alexandreyy added a comment to D41702: Add SysV Abi for PPC64le.

Wait a minute. Is there any reason why we can't add tests now?

Jan 19 2018, 5:37 AM
alexandreyy added a comment to D41702: Add SysV Abi for PPC64le.

Well.. whether this plugin is tested depends on what machine you're running on. If you're running on a ppc machine, plenty of tests will exercise this code (TestReturnValue, and pretty much any test doing expression evaluation). Correct me if I am wrong, but I am assuming you guys are running the lldb testsuite as a part of ppc64le bringup.

Given that our entire test suite is based on compiling things and running them on the host, I don't think it's fair to ask a random contributor to come up with a new test strategy.

(Of course, I would still very much like to have tests which are not host-dependent).

Jan 19 2018, 3:49 AM

Jan 17 2018

alexandreyy added a comment to D41702: Add SysV Abi for PPC64le.

Looks nice. Only nit is we probably don't need the m_endian member variable. See inlined comment.

Jan 17 2018, 11:37 AM
alexandreyy updated the diff for D41702: Add SysV Abi for PPC64le.

Removed m_endian variable.

Jan 17 2018, 11:35 AM
alexandreyy updated the diff for D41702: Add SysV Abi for PPC64le.

Merged ppc64le and ppc64 plugins.

Jan 17 2018, 7:20 AM

Jan 15 2018

alexandreyy added a comment to D41702: Add SysV Abi for PPC64le.

Thanks, @labath and @chmeee .
I will do the merge and send the update soon.

Jan 15 2018, 3:09 AM

Jan 10 2018

alexandreyy added a comment to D41702: Add SysV Abi for PPC64le.

I think the stack frame structure is not correct for the PPC64be plugin.
But it is hard to say how bad it is broken and fix the plugin without testing it.
The register numbers and stack frame structures are different from the ABI 1.9 to the ABI 2.0.

Jan 10 2018, 4:26 AM

Jan 9 2018

alexandreyy added a comment to D41702: Add SysV Abi for PPC64le.

Is the only difference between ppc64 and ppc64le ABIs in the endianness of the values?
If so, could we make one unified ABI which takes the endianness as an argument (in the constructor, or as a template argument, or deduces it from target endiannes, ...) ?

The ABIs have some other differences. The largest difference between the ABIs is how indirect-calls (and, thus, function pointers) work. There are some other more-minor differences, for example, some of the call-frame offsets are different. It still might be possible to unify the support (we certainly have one backend in LLVM for both), but it's a bit more involved than just switching the endianness.

Thanks for the explanation. These don't sound like major differences. Could you take a look the possibility of merging these two plugins? I scanned through the source code, and it looks like a large part of it is the same, so I'm hoping that we can make like 80% of this code go away with a unified plugin.
If you hit some major roadblock which would prevent doing that, then that's fine, but I would at least like to know what the blocker is.

(And sorry for the delays, I've been OOO last week.)

Jan 9 2018, 4:09 AM

Jan 4 2018

alexandreyy added a comment to D41702: Add SysV Abi for PPC64le.

@labath , Could you commit this patch?

Jan 4 2018, 8:58 AM

Jan 3 2018

alexandreyy added a reviewer for D41702: Add SysV Abi for PPC64le: labath.
Jan 3 2018, 8:00 AM
alexandreyy created D41702: Add SysV Abi for PPC64le.
Jan 3 2018, 7:57 AM
alexandreyy changed the visibility for D40647: Fix float expressions for PPC64le.
Jan 3 2018, 4:08 AM
alexandreyy abandoned D40647: Fix float expressions for PPC64le.

Enabled JIT to handle float expressions for PPC64le.

Jan 3 2018, 4:07 AM
alexandreyy changed the visibility for D40647: Fix float expressions for PPC64le.
Jan 3 2018, 4:03 AM

Nov 30 2017

alexandreyy updated the diff for D40647: Fix float expressions for PPC64le.

Add SIToFP and UIToFP instructions to handle comparisons between float and char values.

Nov 30 2017, 8:54 AM
alexandreyy created D40647: Fix float expressions for PPC64le.
Nov 30 2017, 4:50 AM

Nov 29 2017

alexandreyy added a comment to D39016: Add Percent Symbol In PPC Registers for Linux.

Could we commit this patch?

Nov 29 2017, 7:40 AM

Nov 22 2017

alexandreyy accepted D39016: Add Percent Symbol In PPC Registers for Linux.

Thanks, @joerg !
It looks better than before.

Nov 22 2017, 3:30 AM

Nov 21 2017

alexandreyy added a comment to D39016: Add Percent Symbol In PPC Registers for Linux.

@joerg, @echristo, Could you check if these changes are Ok?
Thanks!

Nov 21 2017, 3:58 AM

Nov 16 2017

alexandreyy added a comment to D40133: elf-core: Convert remaining register context to use register set maps.

Looks good to me!

Nov 16 2017, 10:29 AM
alexandreyy added a comment to D39016: Add Percent Symbol In PPC Registers for Linux.

@joerg, @echristo, Could you check if these changes are Ok?
Thanks!

Nov 16 2017, 9:52 AM
alexandreyy added a comment to D39016: Add Percent Symbol In PPC Registers for Linux.

ping

Nov 16 2017, 3:30 AM
alexandreyy added a comment to D39681: Implement core dump debugging for PPC64le.

Also, I have trouble downloading the core file from phabricator. Alexandre, can you sent them to me directly?

Nov 16 2017, 3:29 AM
alexandreyy updated the diff for D39681: Implement core dump debugging for PPC64le.

Removed enums without namespaces.

Nov 16 2017, 3:18 AM

Nov 14 2017

alexandreyy added inline comments to D39681: Implement core dump debugging for PPC64le.
Nov 14 2017, 12:13 PM
alexandreyy added inline comments to D39681: Implement core dump debugging for PPC64le.
Nov 14 2017, 11:44 AM
alexandreyy updated the diff for D39681: Implement core dump debugging for PPC64le.

Removed issue note from commit message.

Nov 14 2017, 10:58 AM
alexandreyy added a comment to D39016: Add Percent Symbol In PPC Registers for Linux.

Hi, guys!
Are these changes Ok to commit?

Nov 14 2017, 10:49 AM
alexandreyy added a comment to D39681: Implement core dump debugging for PPC64le.

I'm not sure what's the problem with backtracing without more info, but the nice thing about core files is that you can open a ppc and x86 one side by side and see how for do you get before things start to diverge. The interesting commands you can start with are "image lookup" (to see if you can find symbols properly), "image show-unwind" (to see the unwind plans) and "log enable lldb unwind && bt" (to see backtracing in action). This is what I get for the x86_64 core file (you should be able to see the same thing yourself):

(lldb) bt
* thread #1, name = 'a.out', stop reason = signal SIGSEGV
  * frame #0: 0x000000000040011c linux-x86_64.out`bar(boom=0x0000000000000000) at main.c:4
    frame #1: 0x0000000000400142 linux-x86_64.out`foo(boom=0x0000000000000000, boomer=(linux-x86_64.out`bar at main.c:2)) at main.c:10
    frame #2: 0x000000000040015f linux-x86_64.out`_start at main.c:16
(lldb) image lookup -n bar
1 match found in /usr/local/google/home/labath/ll/lldb/test/testcases/functionalities/postmortem/elf-core/linux-x86_64.out:
        Address: linux-x86_64.out[0x000000000040010c] (linux-x86_64.out..text + 0)
        Summary: linux-x86_64.out`bar at main.c:2
(lldb) image show-unwind -n bar
UNWIND PLANS for linux-x86_64.out`bar (start addr 0x40010c)

Asynchronous (not restricted to call-sites) UnwindPlan is 'assembly insn profiling'
Synchronous (restricted to call-sites) UnwindPlan is 'eh_frame CFI'
Fast UnwindPlan is 'x86_64 default unwind plan'

Assembly language inspection UnwindPlan:
This UnwindPlan originally sourced from assembly insn profiling
This UnwindPlan is sourced from the compiler: no.
This UnwindPlan is valid at all instruction locations: yes.
Address range of this UnwindPlan: [linux-x86_64.out..text + 0-0x0000000000000015)
row[0]:    0: CFA=rsp +8 => rsp=CFA+0 rip=[CFA-8] 
row[1]:    1: CFA=rsp+16 => rbp=[CFA-16] rsp=CFA+0 rip=[CFA-8] 
row[2]:    4: CFA=rbp+16 => rbp=[CFA-16] rsp=CFA+0 rip=[CFA-8] 
row[3]:   20: CFA=rsp +8 => rsp=CFA+0 rip=[CFA-8] 

eh_frame UnwindPlan:
This UnwindPlan originally sourced from eh_frame CFI
This UnwindPlan is sourced from the compiler: yes.
This UnwindPlan is valid at all instruction locations: no.
Address range of this UnwindPlan: [linux-x86_64.out..text + 0-0x0000000000000015)
row[0]:    0: CFA=rsp +8 => rip=[CFA-8] 
row[1]:    1: CFA=rsp+16 => rbp=[CFA-16] rip=[CFA-8] 
row[2]:    4: CFA=rbp+16 => rbp=[CFA-16] rip=[CFA-8] 
row[3]:   20: CFA=rsp +8 => rbp=[CFA-16] rip=[CFA-8] 

Fast UnwindPlan:
This UnwindPlan originally sourced from x86_64 default unwind plan
This UnwindPlan is sourced from the compiler: no.
This UnwindPlan is valid at all instruction locations: no.
row[0]:    0: CFA=rbp+16 => rbp=[CFA-16] rsp=CFA+0 rip=[CFA-8] 

Arch default UnwindPlan:
This UnwindPlan originally sourced from x86_64 default unwind plan
This UnwindPlan is sourced from the compiler: no.
This UnwindPlan is valid at all instruction locations: no.
row[0]:    0: CFA=rbp+16 => rbp=[CFA-16] rsp=CFA+0 rip=[CFA-8] 

Arch default at entry point UnwindPlan:
This UnwindPlan originally sourced from x86_64 at-func-entry default
This UnwindPlan is sourced from the compiler: no.
This UnwindPlan is valid at all instruction locations: not specified.
row[0]:    0: CFA=rsp +8 => rsp=CFA+0 rip=[CFA-8]
Nov 14 2017, 10:43 AM
alexandreyy updated the diff for D39681: Implement core dump debugging for PPC64le.

Fixed backtrace issue.

Nov 14 2017, 10:38 AM

Nov 10 2017

alexandreyy added inline comments to D39016: Add Percent Symbol In PPC Registers for Linux.
Nov 10 2017, 11:15 AM
alexandreyy updated the diff for D39016: Add Percent Symbol In PPC Registers for Linux.

Fixed identation.

Nov 10 2017, 11:06 AM
alexandreyy added a comment to D39016: Add Percent Symbol In PPC Registers for Linux.

I really appreciate you doing this work. This has been something I've wanted for some time :)

I've added a few things to this. Should also have a testcase as well.

Thanks!

-eric

Thanks @echristo.
I modified the patch according to your comments.

Nov 10 2017, 10:58 AM
alexandreyy updated the diff for D39016: Add Percent Symbol In PPC Registers for Linux.

Updated patch according to review.

Nov 10 2017, 10:56 AM
alexandreyy added a comment to D39681: Implement core dump debugging for PPC64le.

Looks good, thank you. Just please make sure you change the file name at top of the new header file and add inclusion guards.

Nov 10 2017, 5:10 AM
alexandreyy updated the diff for D39681: Implement core dump debugging for PPC64le.

Added inclusion guards in elf-core-enums.h

Nov 10 2017, 5:05 AM

Nov 9 2017

alexandreyy updated the diff for D39681: Implement core dump debugging for PPC64le.

Fixed test identation

Nov 9 2017, 11:00 AM
alexandreyy updated the diff for D39681: Implement core dump debugging for PPC64le.

Changed namespaces in core enums.

Nov 9 2017, 10:13 AM
alexandreyy added a comment to D39681: Implement core dump debugging for PPC64le.

I'm not sure what's the problem with backtracing without more info, but the nice thing about core files is that you can open a ppc and x86 one side by side and see how for do you get before things start to diverge. The interesting commands you can start with are "image lookup" (to see if you can find symbols properly), "image show-unwind" (to see the unwind plans) and "log enable lldb unwind && bt" (to see backtracing in action). This is what I get for the x86_64 core file (you should be able to see the same thing yourself):

(lldb) bt
* thread #1, name = 'a.out', stop reason = signal SIGSEGV
  * frame #0: 0x000000000040011c linux-x86_64.out`bar(boom=0x0000000000000000) at main.c:4
    frame #1: 0x0000000000400142 linux-x86_64.out`foo(boom=0x0000000000000000, boomer=(linux-x86_64.out`bar at main.c:2)) at main.c:10
    frame #2: 0x000000000040015f linux-x86_64.out`_start at main.c:16
(lldb) image lookup -n bar
1 match found in /usr/local/google/home/labath/ll/lldb/test/testcases/functionalities/postmortem/elf-core/linux-x86_64.out:
        Address: linux-x86_64.out[0x000000000040010c] (linux-x86_64.out..text + 0)
        Summary: linux-x86_64.out`bar at main.c:2
(lldb) image show-unwind -n bar
UNWIND PLANS for linux-x86_64.out`bar (start addr 0x40010c)

Asynchronous (not restricted to call-sites) UnwindPlan is 'assembly insn profiling'
Synchronous (restricted to call-sites) UnwindPlan is 'eh_frame CFI'
Fast UnwindPlan is 'x86_64 default unwind plan'

Assembly language inspection UnwindPlan:
This UnwindPlan originally sourced from assembly insn profiling
This UnwindPlan is sourced from the compiler: no.
This UnwindPlan is valid at all instruction locations: yes.
Address range of this UnwindPlan: [linux-x86_64.out..text + 0-0x0000000000000015)
row[0]:    0: CFA=rsp +8 => rsp=CFA+0 rip=[CFA-8] 
row[1]:    1: CFA=rsp+16 => rbp=[CFA-16] rsp=CFA+0 rip=[CFA-8] 
row[2]:    4: CFA=rbp+16 => rbp=[CFA-16] rsp=CFA+0 rip=[CFA-8] 
row[3]:   20: CFA=rsp +8 => rsp=CFA+0 rip=[CFA-8] 

eh_frame UnwindPlan:
This UnwindPlan originally sourced from eh_frame CFI
This UnwindPlan is sourced from the compiler: yes.
This UnwindPlan is valid at all instruction locations: no.
Address range of this UnwindPlan: [linux-x86_64.out..text + 0-0x0000000000000015)
row[0]:    0: CFA=rsp +8 => rip=[CFA-8] 
row[1]:    1: CFA=rsp+16 => rbp=[CFA-16] rip=[CFA-8] 
row[2]:    4: CFA=rbp+16 => rbp=[CFA-16] rip=[CFA-8] 
row[3]:   20: CFA=rsp +8 => rbp=[CFA-16] rip=[CFA-8] 

Fast UnwindPlan:
This UnwindPlan originally sourced from x86_64 default unwind plan
This UnwindPlan is sourced from the compiler: no.
This UnwindPlan is valid at all instruction locations: no.
row[0]:    0: CFA=rbp+16 => rbp=[CFA-16] rsp=CFA+0 rip=[CFA-8] 

Arch default UnwindPlan:
This UnwindPlan originally sourced from x86_64 default unwind plan
This UnwindPlan is sourced from the compiler: no.
This UnwindPlan is valid at all instruction locations: no.
row[0]:    0: CFA=rbp+16 => rbp=[CFA-16] rsp=CFA+0 rip=[CFA-8] 

Arch default at entry point UnwindPlan:
This UnwindPlan originally sourced from x86_64 at-func-entry default
This UnwindPlan is sourced from the compiler: no.
This UnwindPlan is valid at all instruction locations: not specified.
row[0]:    0: CFA=rsp +8 => rsp=CFA+0 rip=[CFA-8]
Nov 9 2017, 6:52 AM
alexandreyy updated the diff for D39681: Implement core dump debugging for PPC64le.

Moved core enums to header file.

Nov 9 2017, 6:49 AM
alexandreyy added a comment to D39016: Add Percent Symbol In PPC Registers for Linux.

Hi,
Could someone review/approve this patch, please?
I don't have the permissions to commit it.
Thanks. ;)

Nov 9 2017, 4:32 AM
alexandreyy added a comment to D39681: Implement core dump debugging for PPC64le.

Thanks for all the reviews @labath and @clayborg.
I changed the code to use the DenseMap and added the files for testing.
The backtrace is not working properly yet,
It is not showing all frames, just the current.
Am I missing something?

Nov 9 2017, 4:26 AM
alexandreyy updated the diff for D39681: Implement core dump debugging for PPC64le.

Update according to reviews.

Nov 9 2017, 4:19 AM

Nov 6 2017

alexandreyy created D39681: Implement core dump debugging for PPC64le.
Nov 6 2017, 4:40 AM

Nov 3 2017

alexandreyy added a comment to D39016: Add Percent Symbol In PPC Registers for Linux.

Hi, @joerg
Could you review/approve these changes?

Nov 3 2017, 8:01 AM
alexandreyy added a comment to D39487: Add float/vector registers for ppc64le.

Thanks @labath.
I adjusted the VSX and VMX methods.

Nov 3 2017, 7:58 AM
alexandreyy updated the diff for D39487: Add float/vector registers for ppc64le.

Simplified vector register methods

Nov 3 2017, 7:54 AM

Nov 1 2017

alexandreyy added a comment to D39487: Add float/vector registers for ppc64le.

@clayborg Thanks for the review.

Nov 1 2017, 11:00 AM
alexandreyy updated subscribers of D39487: Add float/vector registers for ppc64le.
Nov 1 2017, 10:56 AM
alexandreyy added a comment to D39016: Add Percent Symbol In PPC Registers for Linux.

Are these changes ok?

Nov 1 2017, 6:04 AM
alexandreyy created D39487: Add float/vector registers for ppc64le.
Nov 1 2017, 5:15 AM

Oct 30 2017

alexandreyy updated the diff for D39016: Add Percent Symbol In PPC Registers for Linux.

Update patch according to suggestions

Oct 30 2017, 8:18 AM

Oct 27 2017

alexandreyy added inline comments to D39016: Add Percent Symbol In PPC Registers for Linux.
Oct 27 2017, 12:18 PM
alexandreyy added a comment to D39016: Add Percent Symbol In PPC Registers for Linux.

Hi.
Are these changes ok?

Oct 27 2017, 7:54 AM

Oct 24 2017

alexandreyy added a comment to D39016: Add Percent Symbol In PPC Registers for Linux.

If what we want is to name the registers with the percent sign prefix on all non-AIX, non-Darwin systems, why not just change the definitions in the .td files to include the prefix? That way you don't have to worry about this kind of hacky/leaky code to prepend the symbol to the register names. And on AIX/Darwin, we just strip the full prefix (percent symbol and letter). Considering that it is questionable whether LLVM will ever have full support on AIX and that Darwin support is likely to be pulled soon, this seems like the best choice.

Of course, we'd then need to decide how we want to print the CR registers (i.e. if we want to have the ability to print them the way binutils tools print them - 4*cr4+gt, etc.)

Oct 24 2017, 9:45 AM
alexandreyy updated the diff for D39016: Add Percent Symbol In PPC Registers for Linux.

Changed printRegisterWithPercentPrefix to showRegistersWithPercentPrefix

Oct 24 2017, 9:30 AM
alexandreyy updated the diff for D39016: Add Percent Symbol In PPC Registers for Linux.

Update according to review comments

Oct 24 2017, 6:21 AM

Oct 23 2017

alexandreyy added a comment to D39016: Add Percent Symbol In PPC Registers for Linux.

Because it is not possible to change the cl option by LLDB.

There should be no need to. This is not a public interface anyway. Long term, all sources should be changed to consistently use the human-friendly names, but that's a separate issue.

Oct 23 2017, 11:38 AM
alexandreyy added a comment to D39016: Add Percent Symbol In PPC Registers for Linux.

This is even worse. You can't new[] and then free(). Please follow the suggestion on just embedding the prefix directly, if desirable.

Oct 23 2017, 10:22 AM
alexandreyy added a comment to D39016: Add Percent Symbol In PPC Registers for Linux.

The patch is not acceptable in the current form. This includes fixing the memory leaks.

On PowerPC, three different output forms have to be supported:
(1) register name without percent on Darwin
(2) plain register number on AIX
(3) register name with percent OR plain register number on anything else
I don't think there is a big reason for supporting the second option of (3) though. The least amount of change is to introduce a predicate that checks for !Darwin && !AIX and then prints the % in the assembler printer. It is better to just pass down the target directly than deciding in the higher layers which forms should be choosen.

Oct 23 2017, 8:17 AM
alexandreyy added a comment to D39016: Add Percent Symbol In PPC Registers for Linux.

A few general comments:

  1. You should add reviewers to this review. At the minimum @hfinkel, @kbarton and @echristo. Maybe someone from FreeBSD if this affects them.
  2. Why do we need to change the default and get the existing behaviour with an option? Why not the other way around?
  3. Is this syntax accepted by all the assemblers (I think LLVM for PPC runs on FreeBSD as well, but I have no idea if FreeBSD returns true for isOSLinux()? We don't want to produce assembly that we can't assemble.
Oct 23 2017, 8:15 AM
alexandreyy updated the diff for D39016: Add Percent Symbol In PPC Registers for Linux.

Update according to review comments

Oct 23 2017, 7:54 AM

Oct 20 2017

alexandreyy added a comment to D39016: Add Percent Symbol In PPC Registers for Linux.

ping

Oct 20 2017, 4:36 AM

Oct 17 2017

alexandreyy created D39016: Add Percent Symbol In PPC Registers for Linux.
Oct 17 2017, 11:56 AM

Oct 5 2017

alexandreyy added a comment to D38323: Enable breakpoints and read/write GPRs for ppc64le.

Looks fine to me. Sorry about the delay.

@eugene should be able to help you commit this.

Wrt. the extra register context discussion, I believe you will need to implement an extra class or two when you get around to debugging core files, but that should not be necessary right now. (And yes, linux now uses lldb-server for local debugging as well).

Oct 5 2017, 11:27 AM
alexandreyy added a comment to D38323: Enable breakpoints and read/write GPRs for ppc64le.

Hi,
Could you review/approve this patch, please?
I do not have commit permission.
I will add other register sets later.
Thanks! ;)

Oct 5 2017, 5:24 AM

Oct 3 2017

alexandreyy added a comment to D38323: Enable breakpoints and read/write GPRs for ppc64le.

Are these changes ok?
I am implementing the read/write functions for the other registers.
And I will add it later.

Oct 3 2017, 6:24 AM

Sep 29 2017

alexandreyy updated the diff for D38323: Enable breakpoints and read/write GPRs for ppc64le.

Remove duplicated structs and change register set types

Sep 29 2017, 12:15 PM
alexandreyy added a comment to D38323: Enable breakpoints and read/write GPRs for ppc64le.

Looks fine. One main questions for new linux archs in particular: is linux using the lldb-server to debug these days even when debugging locally? If so, then this patch only needs to implement both a native register content and not the lldb_private::RegisterContext subclass.

Sep 29 2017, 12:05 PM

Sep 27 2017

alexandreyy created D38323: Enable breakpoints and read/write GPRs for ppc64le.
Sep 27 2017, 11:25 AM